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

 

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2021-05-16
  • 2022-12-23
  • 2021-07-01
  • 2021-07-18
  • 2022-01-16
  • 2021-11-07
猜你喜欢
  • 2021-10-30
  • 2021-04-20
  • 2021-11-16
  • 2022-02-12
  • 2021-05-22
  • 2022-12-23
  • 2021-12-09
相关资源
相似解决方案