怎么查找一些函数对应的头文件

来源:互联网 发布:js把字符串转为json 编辑:程序博客网 时间:2024/04/30 10:25

在命令行输入

man fopen 

则会显示以下信息

FOPEN(3)                   Linux Programmerâs Manual                  FOPEN(3)


NAME
       fopen, fdopen, freopen - stream open functions


SYNOPSIS
       #include <stdio.h>     /* 这里就是调用这个函数所需要包含的头文件 */


       FILE *fopen(const char *path, const char *mode);

再例如

[root@localhost drive_test]# man open


OPEN(2)                    Linux Programmerâs Manual                   OPEN(2)


NAME
       open, creat - open and possibly create a file or device


SYNOPSIS
       #include <sys/types.h>     /* 这里三个头文件就是你要包含的 */
       #include <sys/stat.h>
       #include <fcntl.h>

       int open(const char *pathname, int flags);
       int open(const char *pathname, int flags, mode_t mode);

但是我试着找过驱动开发常用函数,但是什么也没有找到,另外man还有其他的用法

原创粉丝点击