编译程序出现这个问题
\vc98\include\mswsock.h(74) : error C2065: 'SOCKET' : undeclared identifier
\vc98\include\mswsock.h(74) : error C2146: syntax error : missing ')' before identifier 's'
\vc98\include\mswsock.h(78) : error C2059: syntax error : ')'
\vc98\include\mswsock.h(97) : error C2146: syntax error : missing ')' before identifier 'hSocket'
\vc98\include\mswsock.h(104) : error C2059: syntax error : ')'
类似的问题有100多处错误。mswsock.h是vc自带的头文件呀,难道这个也是错的?高手指点一下,谢谢了 

解决方案 »

  1.   

    谢谢各位大大,下面贴出出错信息和对应的程序段,出错的地方用 //*标出。还有Featured,能说的详细些吗?\vc98\include\mswsock.h(23) : warning C4068: unknown pragma
    #pragma option push -b -a8 -pc -A- /*P_O_Push*/    //*
    \vc98\include\mswsock.h(74) : error C2065: 'SOCKET' : undeclared identifier
    \vc98\include\mswsock.h(74) : error C2146: syntax error : missing ')' before identifier 's'
    \vc98\include\mswsock.h(74) : warning C4229: anachronism used : modifiers on data are ignored
    \vc98\include\mswsock.h(78) : error C2059: syntax error : ')'
    WSARecvEx (
        SOCKET s,        //*
        char FAR *buf,
        int len,
        int FAR *flags
        );               //*
      

  2.   

    gopappy你的意思是不是源程序的版本是vc5的?
      

  3.   

    添加了#define WINVER 0x0500,还是不行
      

  4.   

    #include "winsock.h"
    #include "Mswsock.h"
    #pragma comment(lib,"Ws2_32.lib")
    #pragma comment(lib,"Mswsock.lib")