class Connection
{
public:
typedef boost::shared_ptr<Connection> pointer;
static pointer create(boost::asio::io_service& io_service){return pointer(new Connection(io_service));}
explicit Connection(boost::asio::io_service& io_service);
virtual ~Connection();
boost::asio::ip::tcp::socket& socket();
-->>>virtual void OnConnected()=0;
void Send(uint8_t* buffer, int length);
bool Receive();
private:
void handler(const boost::system::error_code& error, std::size_t bytes_transferred );
boost::asio::ip::tcp::socket socket_;
};
when am trying to use virtual void OnConnected()=0; it gives me this stupid error idk whats wrong!!!
1 IntelliSense: object of abstract class type "Connection" is not allowed: d:\c++\ugs\accountserver\connection.h 17
whats wrong and how can i fix it while in my old connection class it was working good!!
class Connection
{
public:
explicit Connection(int socket);
virtual ~Connection();
virtual void OnConnected() =0;
virtual int Send(uint8_t* buffer, int length);
bool Receive();
int getSocket() const;
void Disconnect();
protected:
virtual void OnReceived(uint8_t* buffer, int len) = 0;
private:
int m_socket;
bool disconnecting;
};
so what am missing here!!