您好,欢迎来到[编程问答]网站首页   源码下载   电子书籍   软件下载   专题
当前位置:首页 >> 编程问答 >> VC/MFC >> 为什么找不到#include头文件??

为什么找不到#include头文件??

来源:网络整理     时间:2016/8/10 12:31:40     关键词:

关于网友提出的“ 为什么找不到#include头文件??”问题疑问,本网通过在网上对“ 为什么找不到#include头文件??”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: 为什么找不到#include头文件??
描述:

我在windows下 对socket进行非阻塞方式设置时 加入如下两个头文件
#include
#include
结果编译时 出错
E:\Server\MainFrm.cpp(7) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
如果我不加这个头文件,就会
erver\MainFrm.cpp(319) : error C2065: 'fcntl' : undeclared identifier
E:\Server\MainFrm.cpp(319) : error C2065: 'sockfd' : undeclared identifier
E:\Server\MainFrm.cpp(319) : error C2065: 'F_SEREL' : undeclared identifier
E:\Server\MainFrm.cpp(319) : error C2065: 'O_NONBLOCK' : undeclared identifier
Error executing cl.exe.
请高手指点!!!!!!!!!!!!!!


解决方案1:

#include 

解决方案2:

这个文件好像只有linux下有


以上介绍了“ 为什么找不到#include头文件??”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/3185799.html

相关图片

相关文章