C、传统 C++ | 标准 C++ | 说明 |
| algorithm | STL 通用算法 |
| bitset | STL 位集容器 |
assert.h | cassert | 设定插入点 |
ctype.h | cctype | 字符处理 |
errno.h | cerrno | 定义错误码 |
float.h |
| 浮点数处理 |
fstream.h | fstream | 文件输入/输出 |
iomanip.h | iomanip | 参数化输入/输出 |
iostream.h | iostream | 数据流输入/输出 |
limits.h | climits | 定义各种数据类型最值常量 |
locale.h | clocale | 定义本地化函数 |
math.h | cmath | 定义数学函数 |
| complex | 复数类 |
stdio.h | cstdio | 定义输入/输出函数 |
stdlib.h | cstdlib | 定义杂项函数及内存分配函数 |
string.h | cstring | 字符串处理 |
strstrea.h |
| 基于数组的输入/输出 |
time.h | ctime | 定义关于时间的函数 |
| deque | STL 双端队列容器 |
| exception | 异常处理类 |
| functional | STL 定义运算函数(代替运算符) |
| list | STL 线性列表容器 |
| map | STL 映射容器 |
| ios | 基本输入/输出支持 |
| iosfwd | 输入/输出系统使用的前置声明 |
| istream | 基本输入流 |
| ostream | 基本输出流 |
| queue | STL 队列容器 |
| set | STL 集合容器 |
| sstream | 基于字符串的流 |
| stack | STL 堆栈容器 |
| stdexcept | 标准异常类 |
| streambuf | 底层输入/输出支持 |
| string | 字符串类 |
| utility | STL 通用模板类 |
| vector | STL 动态数组容器 |
wchar.h | cwchar | 宽字符处理及输入/输出 |
wctype.h | cwctype | 宽字符分类 |
注:using namespace std;
C99 增加
#include <complex.h> //复数处理
#include <fenv.h> //浮点环境
#include <inttypes.h> //整数格式转换
#include <stdbool.h> //布尔环境
#include <stdint.h> //整型环境
#include <tgmath.h> //通用类型数学宏