Boost logo

Boost Users :

Subject: [Boost-users] new user got compile error
From: James Peng (oldyoungguy88_at_[hidden])
Date: 2008-12-01 17:00:56


Just started using Boost. Socket only right now. Created one small class but cannot compile. Please help. Compile error is In file included from Server.cpp:8: ./include/Server.h:26: error: ¡io_service¢ is not a type ./include/Server.h:26: error: expected unqualified-id before ¡(¢ token ./include/Server.h:26: error: expected `)' before ¡(¢ token ./include/Server.h:26: error: expected ¡,¢ or ¡...¢ before ¡(¢ token ./include/Server.h:26: error: expected ¡;¢ before ¡)¢ token ./include/Server.h:27: error: ¡io_service¢ is not a type ----- My header file: /* * Server.h * * Created on: Dec 1, 2008 * Author: */ #ifndef SERVER_H_ #define SERVER_H_ #include <boost/asio.hpp> class Server{ public: Server(){}; ~Server(){}; void print(); protected: private: boost::asio::io_service io_service; boost::asio::ip::tcp::acceptor acceptor(io_service, boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), 13)); boost::asio::ip::tcp::socket asio_socket(io_service); boost::system::error_code error_read; }; #endif /* SERVER_H_ */ ----- My cpp file: /* * Server.cpp * * Created on: Dec 1, 2008 * Author: */ #include "Server.h" void Server::print(){ }



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net