[求助]关于Socket使用
定义:class ServSocket : public CSocket
{
...
}
在View类OnCreate中:
m_pSocket = new ServSocket();
if (m_pSocket->Create(0+700)){
AfxMessageBox("succeed to create socket !");
}
else{
delete m_pSocket;
m_pSocket = NULL;
AfxMessageBox("fail to create socket !");
return -1;
}
为什么总是 fail to create socket !呢?