c语言函数头文件 c语言函数头文件大全表格( 二 )


#include limits.h //定义各种数据类型最值常量
#include locale.h //定义本地化函数
#include math.h //定义数学函数
#include stdio.h //定义输入/输出函数
#include stdlib.h //定义杂项函数及内存分配函数
#include string.h //字符串处理
#include strstrea.h //基于数组c语言函数头文件<>的输入/输出
#include time.h //定义关于时间c语言函数头文件<>的函数
#include wchar.h //宽字符处理及输入/输出
#include wctype.h //宽字符分类
//////////////////////////////////////////////////////////////////////////
标准 C++ (同上的不再注释)
#include algorithm //STL 通用算法
#include bitset //STL 位集容器
#include cctype
#include cerrno
#include clocale
#include cmath
#include complex //复数类
#include cstdio
#include cstdlib
#include cstring
#include ctime
#include deque //STL 双端队列容器
#include exception //异常处理类
#include fstream
#include functional //STL 定义运算函数(代替运算符)
#include limits
#include list //STL 线性列表容器
#include map //STL 映射容器
#include iomanip
#include ios //基本输入/输出支持
#include iosfwd //输入/输出系统使用的前置声明
#include iostream
#include istream //基本输入流
#include ostream //基本输出流
#include queue //STL 队列容器
#include set //STL 集合容器
#include sstream //基于字符串的流
#include stack //STL 堆栈容器
#include stdexcept //标准异常类
#include streambuf //底层输入/输出支持
#include string //字符串类
#include utility //STL 通用模板类
#include vector //STL 动态数组容器
#include cwchar
#include cwctype
using namespace stdc语言函数头文件<>;
//////////////////////////////////////////////////////////////////////////
C99 增加
#include complex.h //复数处理
#include fenv.h //浮点环境
#include inttypes.h //整数格式转换
#include stdbool.h //布尔环境
#include stdint.h //整型环境
#include tgmath.h //通用类型数学宏
#includeconio.h 说明调用DOS控制台I/O子程序的各个函数 。
#includesio.h 包含字符串库函数说明的头文件
#includeslib.h 包含动态存储与释放函数头文件 。
c语言中要引用头文件时“”与amp;lt;amp;gt;的区别!不对c语言函数头文件<>,C语言编译器会用一些目录存放公共头文件 , 如果amp;lt;amp;gt;则只在这些目录下找头文件,如果用““先在当前目录下找 , 如果找不到则在这些目录下找 。不可能搜索所有目录,这样效率太低 。一般来说,自己定义c语言函数头文件<>的头文件应该用““ , 因为这些文件放在工程目录(也就是编译器c语言函数头文件<>的当前目录)下,而不是放在公共头文件目录下,如果用amp;lt;amp;gt;则找不到头文件 。而系统提供c语言函数头文件<>的头文件,比如库函数的头文件,可以用amp;lt;amp;gt;不过保险的话,用““肯定可以找到所有头文件,包括系统库函数头文件和自己定义的头文件
c语言中有哪些常用的头文件?stdio.h是c的头文件 , 包含了对你使用的函数的声明 。
当你决定使用某个函数的时候,你去查它的帮助信息,都会看到这个函数的声明是包含在哪个头文件的,这样你就可以把它包含进来 , 从而使用这个函数 。
具体请查阅c语言对于include的讲解,还有对于函数,变量的声明部分 。include stdio.h 是C的输入输出函数,但在C++中使用可以省略.
#include math.h 是数学函数,譬如你要用到squar()函数时就必须添加这个头文件.

推荐阅读