Home > Software engineering >  MFC to create a socket to chat
MFC to create a socket to chat

Time:09-24

If (false==m_pLsitenSocket - & gt; Create (CHAT_PORT SOCK_STREAM))
{
StrMsg. The Format (_T (" failed to create a socket, % d "), GetLastError);
MessageBox (strMsg);
The delete m_pLsitenSocket;
M_pLsitenSocket=NULL;
return;
}

How to solve?

CodePudding user response:

Baidu search relevant keywords,

CodePudding user response:

The corresponding port is being used

CodePudding user response:

Return value error code should not be the right, the format should not be used % d, % u see what specific error
  • Related