码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2014-07-09 17:31:08      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   文件   os   

    转自: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>

 

关于file文件操作的头文件 【LINUX】 (转载),布布扣,bubuko.com

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

标签:style   blog   http   color   文件   os   

原文地址:http://www.cnblogs.com/lance-ehf/p/3831953.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!