关于file文件操作的头文件 【LINUX】 (转载)

    转自:http://blog.csdn.net/figo77ll/article/details/3156052

    Linux下如果要对文件进行读取访问,需要包含至少以下两个头文件:

#inlcude <unistd.h>
#inlcude <fcntl.h>

   

    其中fcntl.h包含了create和open命令,unistd包含了其他的诸如read, write, close等命令。很奇怪为什么不把fcntl的功能直接放到unistd里面呢。。

 
    如果要对STDIN,STDOUT进行“文件操作”,直接包含以下C的标准库就好了:
   
#include <stdio.h>
原文地址:https://www.cnblogs.com/lance-ehf/p/3831953.html