#include <Windows.h>
#include <winsock2.h>
这两个有重定义socket吗,怎么解决,老是提示重定义,求前辈指教。
#include <winsock2.h>
这两个有重定义socket吗,怎么解决,老是提示重定义,求前辈指教。
解决方案 »
- 求教:标签控件的子对话框显示位置不正确??
- 如何开发类似于标准c的库?
- 关于数据校验验(二进制反码求和)
- 急问:找不到APPWZCHS.DLL是怎么回事?
- 怎样从一个文本文件中读入一些数据?
- 工具栏按钮提示信息不全的问题? 请各位帮帮忙!
- 一个简单的VC处理方式,初学者
- 为什么在保存文件的时候会存取被拒绝?
- 晕了,调了一天,发现当编译成release后,F5运行正常,但Ctrl+F5就出问题??
- 紧急求援:怎么讲一个字符串传到ATL COM 的对话框的编辑框中??谢谢!!
- 我现在要做一个C/S 模式的公司内部用的物流信息管理系统,我用C++做好呢, 还是用C#好呢。
- 如何在不同CPP中调用MFC控件变量
试试不就知道了
The Winsock2.h header file internally includes core elements from the Windows.h header file, so there is not usually an #include line for the Windows.h header file in Winsock applications. If an #include line is needed for the Windows.h header file, this should be preceded with the #define WIN32_LEAN_AND_MEAN macro. For historical reasons, the Windows.h header defaults to including the Winsock.h header file for Windows Sockets 1.1. The declarations in the Winsock.h header file will conflict with the declarations in the Winsock2.h header file required by Windows Sockets 2.0. The WIN32_LEAN_AND_MEAN macro prevents the Winsock.h from being included by the Windows.h header. An example illustrating this is shown below.
具体参考:http://msdn.microsoft.com/en-us/library/windows/desktop/ms737629(v=vs.85).aspx
http://download.csdn.net/detail/geoff08zhang/4571358