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(){
}