首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

请教怎么include<sys/socket.h>

2012-02-07 
请问如何includesys/socket.h可以直接includesys/socket.hnetinet/in.harpa/inet.h吗?还是这三个文件要

请问如何include<sys/socket.h>
可以直接include   sys/socket.h     netinet/in.h   arpa/inet.h吗?
还是这三个文件要另外下载?

[解决办法]
This is Unix/Linux code (sys/socket.h). You can not use that in Windows. You must include the Windows socket header instead, and possibly modify the rest of the program to call Windows socket API 's instead of Unix socket API 's.
[解决办法]
#include <winsock2.h>

#progma lib( "ws2_32.lib ");

热点排行