socket编程声明就出错,有劳定位下,辛苦了
#include "winsock2.h"//add by zhaolixin here
#pragma comment(lib,"ws2_32.lib")//add by zhaolixin here
在函数::InitInstance()中填写的语句如下
WSADATA wsd;//add by zhaolixin here
WSAStartup(MAKEWORD(2,2),&wsd);//add by zhaolixin end
提示如下错误:
Compiling...
ZQQ.cpp
F:\DD\ZQQ\ZQQ.cpp(47) : error C2065: 'WSADATA' : undeclared identifier
F:\DD\ZQQ\ZQQ.cpp(47) : error C2146: syntax error : missing ';' before identifier 'wsd'
F:\DD\ZQQ\ZQQ.cpp(47) : error C2065: 'wsd' : undeclared identifier
F:\DD\ZQQ\ZQQ.cpp(48) : error C2065: 'WSAStartup' : undeclared identifier
Error executing cl.exe.
ZQQ.exe - 4 error(s), 0 warning(s)