I'm having this error when trying to instantiate a new object of a class. The code is:
using boost::asio::ip::tcp;
typedef boost::asio::io_service ioservice;
class cnx
{
public:
cnx(ioservice io);
private:
tcp::socket *s;
};
//constructor:
cnx::cnx(ioservice io)
{
this->s = new tcp::socket(io);
}
outside the cpp/h file of cnx, I try to instantiate as:
ioservice io;
cnx c(io);
or
cnx* c = new cnx(io);
and both result in this error message. What can be causing this?