C和c++中的标准头文件列表

时间:2022-03-30 15:07:18

Where could I find the list of all header files in C and C++?

在哪里可以找到C和c++中所有头文件的列表?

While I am building a library, I am getting an error like 'tree.h not found'. I suppose this is a standard header file in C and C++. This raised in me the curiosity to know all the header files and their contribution.

当我在构建一个库时,我得到了一个错误,比如“树”。h未找到”。我想这是C和c++中的一个标准头文件。这让我产生了好奇心,想知道所有的头文件和它们的贡献。

Is there a place I can search for?

有地方我可以找吗?

I am working on Solaris Unix.

我正在开发Solaris Unix。

4 个解决方案

#1


18  

Try here : http://en.cppreference.com/w/

试着在这里:http://en.cppreference.com/w/

However, you may also be refering to the header files of your OS. These can be found either on MSDN (Windows) or by man command (POSIX systems). Or another source if you're on another OS.

但是,您可能也在引用您的操作系统的头文件。这些可以在MSDN (Windows)或man命令(POSIX systems)上找到。或者另一个源,如果你在另一个操作系统上。

#2


109  

The header 'tree.h' is not standard anywhere.

头的树。h'在任何地方都不标准。


C Standards

ISO/IEC 9899:1990 (C89, C90)

The 15 standard headers in C89 are:

C89中的15个标准标头是:

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

ISO/IEC 9899:1990/Amd.1:1995

The 3 extra headers introduced in C94* (Amendment 1) are:

C94*(修订1)中引入的3个附加标头是:

<iso646.h>  <wchar.h>  <wctype.h>

ISO/IEC 9899:1999 (C99)

The 6 extra headers in C99 are:

C99中额外的6个头文件是:

<complex.h>  <inttypes.h>  <stdint.h>  <tgmath.h>
<fenv.h>     <stdbool.h>

ISO/IEC 9899:2011 (C11)

The 5 extra headers in C2011 (for a total of 29) are:

C2011年新增的5个标头(共29个)是:

<stdalign.h>  <stdatomic.h>  <stdnoreturn.h>  <threads.h>  <uchar.h>

ISO/IEC 9045:2008 (POSIX 2008, Single Unix Specification)

Note that POSIX requires many more headers (82, including all the C99 headers). The list below repeats the standard C (C99) headers. Windows requires a different set of headers, of course.

注意POSIX需要更多的header(82,包括所有C99 header)。下面的列表重复标准的C (C99)标题。当然,Windows需要一组不同的标题。

<aio.h>        <libgen.h>       <spawn.h>         <sys/time.h>
<arpa/inet.h>  <limits.h>       <stdarg.h>        <sys/times.h>
<assert.h>     <locale.h>       <stdbool.h>       <sys/types.h>
<complex.h>    <math.h>         <stddef.h>        <sys/uio.h>
<cpio.h>       <monetary.h>     <stdint.h>        <sys/un.h>
<ctype.h>      <mqueue.h>       <stdio.h>         <sys/utsname.h>
<dirent.h>     <ndbm.h>         <stdlib.h>        <sys/wait.h>
<dlfcn.h>      <net/if.h>       <string.h>        <syslog.h>
<errno.h>      <netdb.h>        <strings.h>       <tar.h>
<fcntl.h>      <netinet/in.h>   <stropts.h>       <termios.h>
<fenv.h>       <netinet/tcp.h>  <sys/ipc.h>       <tgmath.h>
<float.h>      <nl_types.h>     <sys/mman.h>      <time.h>
<fmtmsg.h>     <poll.h>         <sys/msg.h>       <trace.h>
<fnmatch.h>    <pthread.h>      <sys/resource.h>  <ulimit.h>
<ftw.h>        <pwd.h>          <sys/select.h>    <unistd.h>
<glob.h>       <regex.h>        <sys/sem.h>       <utime.h>
<grp.h>        <sched.h>        <sys/shm.h>       <utmpx.h>
<iconv.h>      <search.h>       <sys/socket.h>    <wchar.h>
<inttypes.h>   <semaphore.h>    <sys/stat.h>      <wctype.h>
<iso646.h>     <setjmp.h>       <sys/statvfs.h>   <wordexp.h>
<langinfo.h>   <signal.h>

Note, too, that X/Open Curses requires another set of headers. There was a new version (Release 7) of that specification released in November 2009 (the first update since 1996 — the primary differences are the loss of official support for termcap and pre-standard C <varargs.h> header).

注意,X/Open Curses也需要另一组header。2009年11月发布了该规范的新版本(第7版)(这是自1996年以来的首次更新),主要的不同之处在于对termcap和前标准C 头)。 失去了官方支持。h>

<curses.h>  <term.h>  <uncntrl.h>

Linux Standards Base

There are other headers that you might need to use. For example, there is no mention of <getopt.h> in these lists, but if you are using GNU Getopt (for long options, for example), you will need and use that header. It is standard on Linux according to the LSB, Linux Standards Base. An older version of the LSB was defined as ISO/IEC 23360:2006 in multiple parts; as of 2014-09-21, the current version of the LSB is 4.1 but version 5.0 is in beta. There is a section of the document that defines which headers are included, but there is no convenient table of the headers in the version I looked at. It is closely aligned with POSIX, but has extra facilities beyond what POSIX defines.

您可能需要使用其他标题。例如,没有提到 在这些列表中,但是如果您正在使用GNU Getopt(例如,对于长选项),您将需要并使用该标题。根据Linux标准库LSB,它是Linux上的标准。旧版本的LSB在多个部分被定义为ISO/IEC 23360:2006;到2014-09-21年,LSB的当前版本是4.1,但是5.0还在测试中。文档中有一个部分定义了包含哪些头文件,但是在我查看的版本中没有方便的标头表。它与POSIX紧密结合,但是具有超出POSIX定义的额外功能。 。h>


C++ Standards

ISO/IEC 14882:1998 (C++98)

The standard lists 32 headers specific to C++:

标准列出了针对c++的32个头文件:

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

There are also 18 headers corresponding to headers from C (corresponding to C94):

也有来自C的18个报头(对应C94):

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

Intriguingly, Annex D (§D.7) lists a deprecated header, <strstream>, that is not mentioned earlier in the standard. Including that header with GCC (g++) 7.2.0 generates a warning:

有趣的是,附件D(§D.7)列出了弃用头,< strstream >,这不是前面所提到的标准。包含GCC (g++) 7.2.0的标题会产生一个警告:

/opt/gcc/v7.2.0/include/c++/7.2.0/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header which may be removed without further notice at a future date.
Please use a non-deprecated interface with equivalent functionality
instead. For a listing of replacement headers and interfaces, consult
the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]

The header <strstream> is explicitly listed in the other versions of the standard.

在标准的其他版本中显式列出。

ISO/IEC 14882:2011 (C++11)

The 53 C++ headers in C++11 are:

C+ 11中的53个c++标头是:

<algorithm>           <initializer_list>  <numeric>           <system_error>
<array>               <iomanip>           <ostream>           <thread>
<atomic>              <ios>               <queue>             <tuple>
<bitset>              <iosfwd>            <random>            <type_traits>
<chrono>              <iostream>          <ratio>             <typeindex>
<codecvt>             <istream>           <regex>             <typeinfo>
<complex>             <iterator>          <scoped_allocator>  <unordered_map>
<condition_variable>  <limits>            <set>               <unordered_set>
<deque>               <list>              <sstream>           <utility>
<exception>           <locale>            <stack>             <valarray>
<forward_list>        <map>               <stdexcept>         <vector>
<fstream>             <memory>            <streambuf>
<functional>          <mutex>             <string>
<future>              <new>               <strstream>

The 26 headers related to C (C11) are:

与C (C11)相关的26个标头是:

<cassert>   <cinttypes>  <csignal>    <cstdio>   <cwchar>
<ccomplex>  <ciso646>    <cstdalign>  <cstdlib>  <cwctype>
<cctype>    <climits>    <cstdarg>    <cstring>
<cerrno>    <clocale>    <cstdbool>   <ctgmath>
<cfenv>     <cmath>      <cstddef>    <ctime>
<cfloat>    <csetjmp>    <cstdint>    <cuchar>

ISO/IEC 14882:2014 (C++14)

Provisional list of headers based on draft standard N3797 found at ISO/IEC JTC1/SC22/WG21 site. The data is from tables 14 and 15 in section 17.6.1.2 Headers, amended as noted below. Since the standard has not been published (as of 2014-09-21), this list is not yet definitive.

基于ISO/IEC JTC1/SC22/WG21网站上的标准草案N3797的标题的临时列表。数据来自表14和表15第17.6.1.2节头,修正如下。由于该标准尚未发布(到2014-09-21年),因此该列表尚未确定。

The 54 C++ headers in C++14 are:

c++ 14中的54个头文件是:

<algorithm>           <initializer_list>  <numeric>           <strstream>
<array>               <iomanip>           <ostream>           <system_error>
<atomic>              <ios>               <queue>             <thread>
<bitset>              <iosfwd>            <random>            <tuple>
<chrono>              <iostream>          <ratio>             <type_traits>
<codecvt>             <istream>           <regex>             <typeindex>
<complex>             <iterator>          <scoped_allocator>  <typeinfo>
<condition_variable>  <limits>            <set>               <unordered_map>
<deque>               <list>              <shared_mutex>      <unordered_set>
<exception>           <locale>            <sstream>           <utility>
<forward_list>        <map>               <stack>             <valarray>
<fstream>             <memory>            <stdexcept>         <vector>
<functional>          <mutex>             <streambuf>
<future>              <new>               <string>

The 26 headers related to C (C11) are unchanged compared with C++11:

与C (C11)相关的26个报头与c++ 11相比没有变化:

<cassert>   <cinttypes>  <csignal>    <cstdio>   <cwchar>
<ccomplex>  <ciso646>    <cstdalign>  <cstdlib>  <cwctype>
<cctype>    <climits>    <cstdarg>    <cstring>
<cerrno>    <clocale>    <cstdbool>   <ctgmath>
<cfenv>     <cmath>      <cstddef>    <ctime>
<cfloat>    <csetjmp>    <cstdint>    <cuchar>

There is one new header listed for C++14 compared to C++11, namely <shared_mutex>.

与c++ 11相比,c++ 14列出了一个新的头,即

NB: The draft lists a number of the headers (<deque>, <istream>, <stdexcept>, <unordered_set>) twice. Also, 5 headers from C++11 are not listed in the tables in the draft, namely <exception>, <iterator>, <ratio>, <scoped_allocator>, and <thread>. Since §18.8 defines <exception>, §24 defines <iterator>, §20.11 defines <ratio>, §30 defines <thread>, and §30.4 defines <shared_mutex>, this is an example of why you should not trust the draft standards as being the final word — they contain errors.

NB:草案列出了一些标题( )两次。另外,草案中没有列出来自c++ 11的5个header,即 )。自§18.8定义了> <异常,§24定义<迭代器> ,§20.11定义 <比率> ,§30定义 <线程> ,和§30.4定义< shared_mutex >,这是一个例子,为什么你不应该相信标准草案的最后一句——它们包含错误。

ISO/IEC 14882:2017 (C++17)

Provisional list of headers in C++17 based on the draft N4659 dated 2017-03-21. This is a transcription of tables 16 and 17 from section 20.5.1.2 Headers. This is not the final standard; in theory, something could change.

基于日期为2017-03-21的N4659的临时标题列表。这是第20.5.1.2节的表格16和17的抄本。这不是最终的标准;从理论上讲,有些东西可能会改变。

There are 61 C++ headers:

有61个c++头文件:

<algorithm>           <future>            <numeric>           <strstream>
<any>                 <initializer_list>  <optional>          <system_error>
<array>               <iomanip>           <ostream>           <thread>
<atomic>              <ios>               <queue>             <tuple>
<bitset>              <iosfwd>            <random>            <type_traits>
<chrono>              <iostream>          <ratio>             <typeindex>
<codecvt>             <istream>           <regex>             <typeinfo>
<complex>             <iterator>          <scoped_allocator>  <unordered_map>
<condition_variable>  <limits>            <set>               <unordered_set>
<deque>               <list>              <shared_mutex>      <utility>
<exception>           <locale>            <sstream>           <valarray>
<execution>           <map>               <stack>             <variant>
<filesystem>          <memory>            <stdexcept>         <vector>
<forward_list>        <memory_resource>   <streambuf>
<fstream>             <mutex>             <string>
<functional>          <new>               <string_view>

The new headers compared to C++14 seem to be: <any>, <execution>, <filesystem>, <memory_resource>, <optional>, <string_view>, <variant>.

与c++ 14相比,新的标题似乎是: , <文件系统> , , <可选> , , <变体> 。

Again, the 26 headers related to C (C11) are unchanged compared with C++11 and C++14:

同样,与C (C11)相关的26个报头与c++ 11和c++ 14相比没有变化:

<cassert>   <cinttypes>  <csignal>    <cstdio>   <cwchar>
<ccomplex>  <ciso646>    <cstdalign>  <cstdlib>  <cwctype>
<cctype>    <climits>    <cstdarg>    <cstring>
<cerrno>    <clocale>    <cstdbool>   <ctgmath>
<cfenv>     <cmath>      <cstddef>    <ctime>
<cfloat>    <csetjmp>    <cstdint>    <cuchar>

See also What are the new features in C++17?

看看c++ 17的新特性是什么?

Note that some of the 'C library' headers are deprecated in C++17, specifically <ccomplex>, <cstdalign>, <cstdbool>, <ctgmath> (and not <ciso646>). The C++ header <codecvt> (added in C++11) is also deprecated in C++17.

注意,在c++ 17中,一些“C库”的头是不推荐的,特别是 (而不是 )。c++头 (在c++ 11中添加)在c++ 17中也不使用。


*The 'off by one year' issues in the dates are due to the time it takes to process the standard after it is approved. ANSI approved the original C standard in 1989; ISO approved it in 1990. Amendment 1 was approved in 1994; it was released in 1995.

*日期上的“关一年”问题是由于标准通过后的处理时间。ANSI在1989年批准了原C标准;ISO是在1990年批准的。修正案1于1994年获得核可;它于1995年发行。

#3


8  

http://www.cplusplus.com/reference/ lists all the standard C++ headers and the C++ wrappers of C header files.

http://www.cplusplus.com/reference/列出所有标准的c++头文件和C头文件的c++包装器。

tree.h is not part of the standard library.

树。h不是标准库的一部分。

#4


6  

I found this Wikipedia entry on the C standard library which contains, lists of C header files and detailed information on which standard they're part of. That gives you a nice historical perspective and some other, similar details.

我在*上找到了这个C标准库的条目,它包含了C头文件的列表以及它们属于哪个标准的详细信息。这给了你一个很好的历史视角和其他类似的细节。

Of course that's just C. There's a similar article to be found under "C++ standard library". That also has references to some other libraries which may not be "standard" per se but without which C++ would feel "crippled" to some people used to working with the extensions.

当然,这只是C。在“c++标准库”下也有类似的文章。它还引用了一些其他的库,这些库本身可能不是“标准的”,但是如果没有这些库,c++会让一些习惯于使用扩展的人感到“瘫痪”。

#1


18  

Try here : http://en.cppreference.com/w/

试着在这里:http://en.cppreference.com/w/

However, you may also be refering to the header files of your OS. These can be found either on MSDN (Windows) or by man command (POSIX systems). Or another source if you're on another OS.

但是,您可能也在引用您的操作系统的头文件。这些可以在MSDN (Windows)或man命令(POSIX systems)上找到。或者另一个源,如果你在另一个操作系统上。

#2


109  

The header 'tree.h' is not standard anywhere.

头的树。h'在任何地方都不标准。


C Standards

ISO/IEC 9899:1990 (C89, C90)

The 15 standard headers in C89 are:

C89中的15个标准标头是:

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

ISO/IEC 9899:1990/Amd.1:1995

The 3 extra headers introduced in C94* (Amendment 1) are:

C94*(修订1)中引入的3个附加标头是:

<iso646.h>  <wchar.h>  <wctype.h>

ISO/IEC 9899:1999 (C99)

The 6 extra headers in C99 are:

C99中额外的6个头文件是:

<complex.h>  <inttypes.h>  <stdint.h>  <tgmath.h>
<fenv.h>     <stdbool.h>

ISO/IEC 9899:2011 (C11)

The 5 extra headers in C2011 (for a total of 29) are:

C2011年新增的5个标头(共29个)是:

<stdalign.h>  <stdatomic.h>  <stdnoreturn.h>  <threads.h>  <uchar.h>

ISO/IEC 9045:2008 (POSIX 2008, Single Unix Specification)

Note that POSIX requires many more headers (82, including all the C99 headers). The list below repeats the standard C (C99) headers. Windows requires a different set of headers, of course.

注意POSIX需要更多的header(82,包括所有C99 header)。下面的列表重复标准的C (C99)标题。当然,Windows需要一组不同的标题。

<aio.h>        <libgen.h>       <spawn.h>         <sys/time.h>
<arpa/inet.h>  <limits.h>       <stdarg.h>        <sys/times.h>
<assert.h>     <locale.h>       <stdbool.h>       <sys/types.h>
<complex.h>    <math.h>         <stddef.h>        <sys/uio.h>
<cpio.h>       <monetary.h>     <stdint.h>        <sys/un.h>
<ctype.h>      <mqueue.h>       <stdio.h>         <sys/utsname.h>
<dirent.h>     <ndbm.h>         <stdlib.h>        <sys/wait.h>
<dlfcn.h>      <net/if.h>       <string.h>        <syslog.h>
<errno.h>      <netdb.h>        <strings.h>       <tar.h>
<fcntl.h>      <netinet/in.h>   <stropts.h>       <termios.h>
<fenv.h>       <netinet/tcp.h>  <sys/ipc.h>       <tgmath.h>
<float.h>      <nl_types.h>     <sys/mman.h>      <time.h>
<fmtmsg.h>     <poll.h>         <sys/msg.h>       <trace.h>
<fnmatch.h>    <pthread.h>      <sys/resource.h>  <ulimit.h>
<ftw.h>        <pwd.h>          <sys/select.h>    <unistd.h>
<glob.h>       <regex.h>        <sys/sem.h>       <utime.h>
<grp.h>        <sched.h>        <sys/shm.h>       <utmpx.h>
<iconv.h>      <search.h>       <sys/socket.h>    <wchar.h>
<inttypes.h>   <semaphore.h>    <sys/stat.h>      <wctype.h>
<iso646.h>     <setjmp.h>       <sys/statvfs.h>   <wordexp.h>
<langinfo.h>   <signal.h>

Note, too, that X/Open Curses requires another set of headers. There was a new version (Release 7) of that specification released in November 2009 (the first update since 1996 — the primary differences are the loss of official support for termcap and pre-standard C <varargs.h> header).

注意,X/Open Curses也需要另一组header。2009年11月发布了该规范的新版本(第7版)(这是自1996年以来的首次更新),主要的不同之处在于对termcap和前标准C 头)。 失去了官方支持。h>

<curses.h>  <term.h>  <uncntrl.h>

Linux Standards Base

There are other headers that you might need to use. For example, there is no mention of <getopt.h> in these lists, but if you are using GNU Getopt (for long options, for example), you will need and use that header. It is standard on Linux according to the LSB, Linux Standards Base. An older version of the LSB was defined as ISO/IEC 23360:2006 in multiple parts; as of 2014-09-21, the current version of the LSB is 4.1 but version 5.0 is in beta. There is a section of the document that defines which headers are included, but there is no convenient table of the headers in the version I looked at. It is closely aligned with POSIX, but has extra facilities beyond what POSIX defines.

您可能需要使用其他标题。例如,没有提到 在这些列表中,但是如果您正在使用GNU Getopt(例如,对于长选项),您将需要并使用该标题。根据Linux标准库LSB,它是Linux上的标准。旧版本的LSB在多个部分被定义为ISO/IEC 23360:2006;到2014-09-21年,LSB的当前版本是4.1,但是5.0还在测试中。文档中有一个部分定义了包含哪些头文件,但是在我查看的版本中没有方便的标头表。它与POSIX紧密结合,但是具有超出POSIX定义的额外功能。 。h>


C++ Standards

ISO/IEC 14882:1998 (C++98)

The standard lists 32 headers specific to C++:

标准列出了针对c++的32个头文件:

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

There are also 18 headers corresponding to headers from C (corresponding to C94):

也有来自C的18个报头(对应C94):

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

Intriguingly, Annex D (§D.7) lists a deprecated header, <strstream>, that is not mentioned earlier in the standard. Including that header with GCC (g++) 7.2.0 generates a warning:

有趣的是,附件D(§D.7)列出了弃用头,< strstream >,这不是前面所提到的标准。包含GCC (g++) 7.2.0的标题会产生一个警告:

/opt/gcc/v7.2.0/include/c++/7.2.0/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header which may be removed without further notice at a future date.
Please use a non-deprecated interface with equivalent functionality
instead. For a listing of replacement headers and interfaces, consult
the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]

The header <strstream> is explicitly listed in the other versions of the standard.

在标准的其他版本中显式列出。

ISO/IEC 14882:2011 (C++11)

The 53 C++ headers in C++11 are:

C+ 11中的53个c++标头是:

<algorithm>           <initializer_list>  <numeric>           <system_error>
<array>               <iomanip>           <ostream>           <thread>
<atomic>              <ios>               <queue>             <tuple>
<bitset>              <iosfwd>            <random>            <type_traits>
<chrono>              <iostream>          <ratio>             <typeindex>
<codecvt>             <istream>           <regex>             <typeinfo>
<complex>             <iterator>          <scoped_allocator>  <unordered_map>
<condition_variable>  <limits>            <set>               <unordered_set>
<deque>               <list>              <sstream>           <utility>
<exception>           <locale>            <stack>             <valarray>
<forward_list>        <map>               <stdexcept>         <vector>
<fstream>             <memory>            <streambuf>
<functional>          <mutex>             <string>
<future>              <new>               <strstream>

The 26 headers related to C (C11) are:

与C (C11)相关的26个标头是:

<cassert>   <cinttypes>  <csignal>    <cstdio>   <cwchar>
<ccomplex>  <ciso646>    <cstdalign>  <cstdlib>  <cwctype>
<cctype>    <climits>    <cstdarg>    <cstring>
<cerrno>    <clocale>    <cstdbool>   <ctgmath>
<cfenv>     <cmath>      <cstddef>    <ctime>
<cfloat>    <csetjmp>    <cstdint>    <cuchar>

ISO/IEC 14882:2014 (C++14)

Provisional list of headers based on draft standard N3797 found at ISO/IEC JTC1/SC22/WG21 site. The data is from tables 14 and 15 in section 17.6.1.2 Headers, amended as noted below. Since the standard has not been published (as of 2014-09-21), this list is not yet definitive.

基于ISO/IEC JTC1/SC22/WG21网站上的标准草案N3797的标题的临时列表。数据来自表14和表15第17.6.1.2节头,修正如下。由于该标准尚未发布(到2014-09-21年),因此该列表尚未确定。

The 54 C++ headers in C++14 are:

c++ 14中的54个头文件是:

<algorithm>           <initializer_list>  <numeric>           <strstream>
<array>               <iomanip>           <ostream>           <system_error>
<atomic>              <ios>               <queue>             <thread>
<bitset>              <iosfwd>            <random>            <tuple>
<chrono>              <iostream>          <ratio>             <type_traits>
<codecvt>             <istream>           <regex>             <typeindex>
<complex>             <iterator>          <scoped_allocator>  <typeinfo>
<condition_variable>  <limits>            <set>               <unordered_map>
<deque>               <list>              <shared_mutex>      <unordered_set>
<exception>           <locale>            <sstream>           <utility>
<forward_list>        <map>               <stack>             <valarray>
<fstream>             <memory>            <stdexcept>         <vector>
<functional>          <mutex>             <streambuf>
<future>              <new>               <string>

The 26 headers related to C (C11) are unchanged compared with C++11:

与C (C11)相关的26个报头与c++ 11相比没有变化:

<cassert>   <cinttypes>  <csignal>    <cstdio>   <cwchar>
<ccomplex>  <ciso646>    <cstdalign>  <cstdlib>  <cwctype>
<cctype>    <climits>    <cstdarg>    <cstring>
<cerrno>    <clocale>    <cstdbool>   <ctgmath>
<cfenv>     <cmath>      <cstddef>    <ctime>
<cfloat>    <csetjmp>    <cstdint>    <cuchar>

There is one new header listed for C++14 compared to C++11, namely <shared_mutex>.

与c++ 11相比,c++ 14列出了一个新的头,即

NB: The draft lists a number of the headers (<deque>, <istream>, <stdexcept>, <unordered_set>) twice. Also, 5 headers from C++11 are not listed in the tables in the draft, namely <exception>, <iterator>, <ratio>, <scoped_allocator>, and <thread>. Since §18.8 defines <exception>, §24 defines <iterator>, §20.11 defines <ratio>, §30 defines <thread>, and §30.4 defines <shared_mutex>, this is an example of why you should not trust the draft standards as being the final word — they contain errors.

NB:草案列出了一些标题( )两次。另外,草案中没有列出来自c++ 11的5个header,即 )。自§18.8定义了> <异常,§24定义<迭代器> ,§20.11定义 <比率> ,§30定义 <线程> ,和§30.4定义< shared_mutex >,这是一个例子,为什么你不应该相信标准草案的最后一句——它们包含错误。

ISO/IEC 14882:2017 (C++17)

Provisional list of headers in C++17 based on the draft N4659 dated 2017-03-21. This is a transcription of tables 16 and 17 from section 20.5.1.2 Headers. This is not the final standard; in theory, something could change.

基于日期为2017-03-21的N4659的临时标题列表。这是第20.5.1.2节的表格16和17的抄本。这不是最终的标准;从理论上讲,有些东西可能会改变。

There are 61 C++ headers:

有61个c++头文件:

<algorithm>           <future>            <numeric>           <strstream>
<any>                 <initializer_list>  <optional>          <system_error>
<array>               <iomanip>           <ostream>           <thread>
<atomic>              <ios>               <queue>             <tuple>
<bitset>              <iosfwd>            <random>            <type_traits>
<chrono>              <iostream>          <ratio>             <typeindex>
<codecvt>             <istream>           <regex>             <typeinfo>
<complex>             <iterator>          <scoped_allocator>  <unordered_map>
<condition_variable>  <limits>            <set>               <unordered_set>
<deque>               <list>              <shared_mutex>      <utility>
<exception>           <locale>            <sstream>           <valarray>
<execution>           <map>               <stack>             <variant>
<filesystem>          <memory>            <stdexcept>         <vector>
<forward_list>        <memory_resource>   <streambuf>
<fstream>             <mutex>             <string>
<functional>          <new>               <string_view>

The new headers compared to C++14 seem to be: <any>, <execution>, <filesystem>, <memory_resource>, <optional>, <string_view>, <variant>.

与c++ 14相比,新的标题似乎是: , <文件系统> , , <可选> , , <变体> 。

Again, the 26 headers related to C (C11) are unchanged compared with C++11 and C++14:

同样,与C (C11)相关的26个报头与c++ 11和c++ 14相比没有变化:

<cassert>   <cinttypes>  <csignal>    <cstdio>   <cwchar>
<ccomplex>  <ciso646>    <cstdalign>  <cstdlib>  <cwctype>
<cctype>    <climits>    <cstdarg>    <cstring>
<cerrno>    <clocale>    <cstdbool>   <ctgmath>
<cfenv>     <cmath>      <cstddef>    <ctime>
<cfloat>    <csetjmp>    <cstdint>    <cuchar>

See also What are the new features in C++17?

看看c++ 17的新特性是什么?

Note that some of the 'C library' headers are deprecated in C++17, specifically <ccomplex>, <cstdalign>, <cstdbool>, <ctgmath> (and not <ciso646>). The C++ header <codecvt> (added in C++11) is also deprecated in C++17.

注意,在c++ 17中,一些“C库”的头是不推荐的,特别是 (而不是 )。c++头 (在c++ 11中添加)在c++ 17中也不使用。


*The 'off by one year' issues in the dates are due to the time it takes to process the standard after it is approved. ANSI approved the original C standard in 1989; ISO approved it in 1990. Amendment 1 was approved in 1994; it was released in 1995.

*日期上的“关一年”问题是由于标准通过后的处理时间。ANSI在1989年批准了原C标准;ISO是在1990年批准的。修正案1于1994年获得核可;它于1995年发行。

#3


8  

http://www.cplusplus.com/reference/ lists all the standard C++ headers and the C++ wrappers of C header files.

http://www.cplusplus.com/reference/列出所有标准的c++头文件和C头文件的c++包装器。

tree.h is not part of the standard library.

树。h不是标准库的一部分。

#4


6  

I found this Wikipedia entry on the C standard library which contains, lists of C header files and detailed information on which standard they're part of. That gives you a nice historical perspective and some other, similar details.

我在*上找到了这个C标准库的条目,它包含了C头文件的列表以及它们属于哪个标准的详细信息。这给了你一个很好的历史视角和其他类似的细节。

Of course that's just C. There's a similar article to be found under "C++ standard library". That also has references to some other libraries which may not be "standard" per se but without which C++ would feel "crippled" to some people used to working with the extensions.

当然,这只是C。在“c++标准库”下也有类似的文章。它还引用了一些其他的库,这些库本身可能不是“标准的”,但是如果没有这些库,c++会让一些习惯于使用扩展的人感到“瘫痪”。