网络编程问题 是关于头文件的吗 帮帮忙

haxiang_3 2008-08-06 03:09:11
:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(16) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(35) : error C2653: '_AFX_SOCK_STATE' : is not a class or namespace name
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(37) : error C2065: 'm_pfnSockTerm' : undeclared identifier
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(39) : warning C4508: '_AFX_SOCK_STATE' : function should return a value; 'void' return type assumed
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(46) : error C2065: 'pState' : undeclared identifier
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(46) : error C2296: '*' : illegal, left operand has type 'int (__cdecl *)(void)'
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(46) : error C2065: '_afxSockState' : undeclared identifier
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(46) : error C2228: left of '.GetData' must have class/struct/union type
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(47) : error C2227: left of '->m_hInstSOCK' must point to class/struct/union
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(49) : error C2227: left of '->m_pfnSockTerm' must point to class/struct/union
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(51) : error C2227: left of '->m_hInstSOCK' must point to class/struct/union
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(52) : error C2227: left of '->m_hInstSOCK' must point to class/struct/union
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(58) : error C2296: '*' : illegal, left operand has type 'int (__cdecl *)(void)'
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(58) : error C2228: left of '.GetData' must have class/struct/union type
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(59) : error C2227: left of '->m_pfnSockTerm' must point to class/struct/union
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(78) : error C2227: left of '->m_pfnSockTerm' must point to class/struct/union
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(205) : error C2065: 'USES_CONVERSION' : undeclared identifier
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(210) : error C2065: 'T2A' : undeclared identifier
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(210) : error C2440: 'initializing' : cannot convert from 'int' to 'char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(250) : error C2440: 'initializing' : cannot convert from 'int' to 'char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(306) : error C2440: 'initializing' : cannot convert from 'int' to 'char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(341) : error C2065: 'WM_SOCKET_NOTIFY' : undeclared identifier
D:\Microsoft Visual Studio\VC98\MFC\SRC\SOCKCORE.CPP(491) : error C2065: 'WM_SOCKET_DEAD' : undeclared identifier

一共有28个错误 但是我觉得应该就是一个地方错了 很多宏都不能给编译器识别 是为什么呢?
...全文
239 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
guo0395 2009-01-13
  • 打赏
  • 举报
回复
请问这个问题解决了吗?我也出现这个问题了,请教中。。。。
arvid_gs 2008-08-07
  • 打赏
  • 举报
回复
'WM_SOCKET_DEAD' 都是自己定义的消息吧?
greatws 2008-08-06
  • 打赏
  • 举报
回复
相关的东西查下MSDN,看看缺少那个头文件
ouyh12345 2008-08-06
  • 打赏
  • 举报
回复
明显是缺少头文件

18,356

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧