C++ Standard Library Header Files
The C++ Standard Library is divided into many portions, each with its own header file. The header files contain the function prototypes for the related functions that form each portion of the library. The header files also contain definitions of various class types and functions, as well as constants needed by those functions. A header file "instructs" the compiler on how to interface with library and user-written components.
Figure 6.7 lists some common C++ Standard Library header files, most of which are discussed later in the book. The term "macro" that is used several times in Fig. 6.7 is discussed in detail in Appendix F, Preprocessor. Header file names ending in .h are "old-style" header files that have been superseded by the C++ Standard Library header files. We use only the C++ Standard Library versions of each header file in this book to ensure that our examples will work on most standard C++ compilers.
C++ Standard Library header file |
Explanation |
---|---|
Contains function prototypes for the C++ standard input and standard output functions, introduced in Chapter 2, and is covered in more detail in Chapter 15, Stream Input/Output. This header file replaces header file . |
|
Contains function prototypes for stream manipulators that format streams of data. This header file is first used in Section 4.9 and is discussed in more detail in Chapter 15, Stream Input/Output. This header file replaces header file . |
|
Contains function prototypes for math library functions (discussed in Section 6.3). This header file replaces header file . |
|
Contains function prototypes for conversions of numbers to text, text to numbers, memory allocation, random numbers and various other utility functions. Portions of the header file are covered in Section 6.7; Chapter 11, Operator Overloading; String and Array Objects; Chapter 16, Exception Handling; Chapter 19, Web Programming; Chapter 22, Bits, Characters, C-Strings and structs; and Appendix E, C Legacy Code Topics. This header file replaces header file . |
|
Contains function prototypes and types for manipulating the time and date. This header file replaces header file . This header file is used in Section 6.7. |
|
, , , , , , , |
These header files contain classes that implement the C++ Standard Library containers. Containers store data during a program's execution. The header is first introduced in Chapter 7, Arrays and Vectors. We discuss all these header files in Chapter 23, Standard Template Library (STL). |
Contains function prototypes for functions that test characters for certain properties (such as whether the character is a digit or a punctuation), and function prototypes for functions that can be used to convert lowercase letters to uppercase letters and vice versa. This header file replaces header file . These topics are discussed in Chapter 8, Pointers and Pointer-Based Strings, and Chapter 22, Bits, Characters, C-Strings and structs. |
|
Contains function prototypes for C-style string-processing functions. This header file replaces header file . This header file is used in Chapter 11, Operator Overloading; String and Array Objects. |
|
Contains classes for runtime type identification (determining data types at execution time). This header file is discussed in Section 13.8. |
|
, |
These header files contain classes that are used for exception handling (discussed in Chapter 16). |
Contains classes and functions used by the C++ Standard Library to allocate memory to the C++ Standard Library containers. This header is used in Chapter 16, Exception Handling. |
|
Contains function prototypes for functions that perform input from files on disk and output to files on disk (discussed in Chapter 17, File Processing). This header file replaces header file . |
|
Contains the definition of class string from the C++ Standard Library (discussed in Chapter 18). |
|
Contains function prototypes for functions that perform input from strings in memory and output to strings in memory (discussed in Chapter 18, Class string and String Stream Processing). |
|
Contains classes and functions used by C++ Standard Library algorithms. This header file is used in Chapter 23. |
|
Contains classes for accessing data in the C++ Standard Library containers. This header file is used in Chapter 23, Standard Template Library (STL). |
|
Contains functions for manipulating data in C++ Standard Library containers. This header file is used in Chapter 23. |
|
Contains macros for adding diagnostics that aid program debugging. This replaces header file from pre-standard C++. This header file is used in Appendix F, Preprocessor. |
|
Contains the floating-point size limits of the system. This header file replaces header file . |
|
Contains the integral size limits of the system. This header file replaces header file . |
|
Contains function prototypes for the C-style standard input/output library functions and information used by them. This header file replaces header file . |
|
Contains classes and functions normally used by stream processing to process data in the natural form for different languages (e.g., monetary formats, sorting strings, character presentation, etc.). |
|
Contains classes for defining the numerical data type limits on each computer platform. |
|
Contains classes and functions that are used by many C++ Standard Library header files. |