私はこのコードを持っています:
class Connection
{
public:
boost::asio::ip::tcp::socket socket_;
}
void main()
{
Connection* session = new Connection();
//for example
session->socket_.close() // FATAL ERROR PAGE FAULT
// How to check whether child member socket_ is null? if(session->socket_ != NULL) - error : no operator != mathes these operands
}
私が試したときif(session->socket_ != NULL)
- エラー: 演算子なし != これらのオペランドを計算します
私はVS2010を使用しています
ありがとう!