c++ - c++标准中有多少个头文件?

标签 c++ c header standards

在 C89 中有 15 个头文件:

<assert.h>  <locale.h>  <stddef.h>  <ctype.h>  <math.h>
<stdio.h>  <errno.h>  <setjmp.h>  <stdlib.h>  <float.h>
<signal.h>  <string.h>  <limits.h>  <stdarg.h>  <time.h>

C++ 标准呢?

最佳答案

33 个 C++ 特定的:

<algorithm>    <iomanip>    <list>      <queue>       <streambuf>
<bitset>       <ios>        <locale>    <set>         <string>
<complex>      <iosfwd>     <map>       <sstream>     <typeinfo>
<deque>        <iostream>   <memory>    <stack>       <utility>
<exception>    <istream>    <new>       <stdexcept>   <valarray>
<fstream>      <iterator>   <numeric>   <strstream>   <vector>
<functional>   <limits>     <ostream>

加上从 C 借来的 18:

<cassert> <ciso646> <csetjmp> <cstdio>  <ctime>
<cctype>  <climits> <csignal> <cstdlib> <cwchar>
<cerrno>  <clocale> <cstdarg> <cstring> <cwctype>
<cfloat>  <cmath>   <cstddef>

(<iso646.h><wchar.h><wctype.h> 于 1995 年添加到 C 标准中)

关于c++ - c++标准中有多少个头文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3940013/

相关文章:

c++ - 添加到 std::vector 的中间

c++ - 带有几个图标和文本的复杂按钮

c++ - 容器之间的区别

c++ - 将位解压缩为单精度 float 的最快方法

c++ - asm.js 规范中提到的 c/c++ 虚拟机是什么

c++ - '未定义对 Class::method() 的引用'

c++ - _vfprintf_r() 中的奇怪段错误 C++

c++ - UNICODE、UTF-8 和 Windows 困惑

c++ - 如何从 C++ 中的 header 中的类创建继承类

c++ - Xcode 头文件