Library Header Files in C++

Library header files in C++ programming with meaning are listed below. You can use the following header files by including the header files in the program using #include.

Utilities libraries

Libraries Meaning
<cstdlib> General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search.
<csignal> Functions and macro constants for signal management.
<csetjmp> Macro (and function) that saves (and jumps) to an execution context.
<cstdarg> Handling of variable length argument lists.
<typeinfo> Runtime type information utilities.
<typeindex> std::type_index.
<type_traits> Compile-time type information.
<bitset> std::bitset class template.
<functional> Function objects, designed for use with the standard algorithms.
<utility> Various utility components.
<ctime> C-style time/date utilites.
<chrono> C++ time utilities.
<cstddef> typedefs for types such as size_t, NULL and others.
<initializer_list> std::initializer_list class template.
<tuple> std::tuple class template.

Dynamic memory management

Libraries Meaning
<new> Low-level memory management utilities.
<memory> Higher level memory management utilities.
<scoped_allocator> Nested allocator class.

Numeric limits

Libraries Meaning
<climits> limits of integral types.
<cfloat> limits of float types.
<cstdint> fixed-size types and limits of other types.
<cinttypes> formatting macros, intmax_t and uintmax_t math and conversions.
<limits> standardized way to query properties of fundamental types.

Error handling
Libraries Meaning
<exception> Exception handling utilities.
<stdexcept> Standard exception objects.
<cassert> Conditionally compiled macro that compares its argument to zero.
<system_error> defines std::error_code, a platform-dependent error code.
<cerrno> Macro containing the last error number.

Strings libraries
Libraries Meaning
<cctype> functions to determine the type contained in character data.
<cwctype> functions for determining the type of wide character data.
<cstring> various narrow character string handling functions.
<cwchar> various wide and multibyte string handling functions.
<cuchar> C-style Unicode character conversion functions.
<string> std::basic_string class template.

Containers libraries
Libraries Meaning
<array> std::array container.
<vector> std::vector container.
<deque> std::deque container.
<list> std::list container.
<forward_list> std::forward_list container.
<set> std::set and std::multiset associative containers.
<map> std::map and std::multimap associative containers.
<unordered_set> std::unordered_set and std::unordered_multiset unordered associative containers.
<unordered_map> std::unordered_map and std::unordered_multimap unordered associative containers.
<stack> std::stack container adaptor.
<queue> std::queue and std::priority_queue container adaptors.

Algorithms libraries
Libraries Meaning
<algorithm> Algorithms that operate on containers.

Iterators libraries
Libraries Meaning
<iterator> Container iterators.

Numeric libraries
Libraries Meaning
<cmath> Common mathematics functions.
<complex> Complex number type.
<valarray> Class for representing and manipulating arrays of values.
<random> Random number generators and distributions.
<numeric> Numeric operations on values in containers.
<ratio> Compile-time rational arithmetic.
<cfenv> Floating-point environment access functions.

Input/output libraries
Libraries Meaning
<iosfwd> forward declarations of all classes in the input/output library.
<ios> std::ios_base class, std::basic_ios class template and several typedefs.
<istream> std::basic_istream class template and several typedefs.
<ostream> std::basic_ostream, std::basic_iostream class templates and several typedefs.
<iostream> several standard stream objects.
<fstream> std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs.
<sstream> std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs.
<strstream> std::strstream, std::istrstream, std::ostrstream(deprecated).
<iomanip> Helper functions to control the format or input and output.
<streambuf> std::basic_streambuf class template.
<cstdio> C-style input-output functions.

Localization libraries
Libraries Meaning
<locale> Localization utilities.
<clocale> C localization utilities.
<codecvt> Unicode conversion facilities.

Regular Expressions libraries
Libraries Meaning
<regex> Classes, algorithms and iterators to support regular expression processing.

Atomic Operations libraries
Libraries Meaning
<atomic> Atomic operations library.

Thread support libraries
Libraries Meaning
<thread> std::thread class and supporting functions.
<mutex> mutual exclusion primitives.
<shared_mutex> shared mutual exclusion primitives.
<future> primitives for asynchronous computations.
<condition_variable> thread waiting conditions.

C compatibility headers
Libraries Meaning
<ciso646> empty header. The macros that appear in iso646.h in C are keywords in C++.
<ccomplex> simply includes the header <complex>.
<ctgmath> simply includes the headers <ccomplex> and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by <cmath> and <complex>.
<cstdalign> defines one compatibility macro constant.
<cstdbool> defines one compatibility macro constant.

Deprecated headers
Libraries Meaning
<assert.h> behaves as if each name from <cassert> is placed in global namespace.
<complex.h> behaves as if each name from <ccomplex> is placed in global namespace.
<ctype.h> behaves as if each name from <cctype> is placed in global namespace.
<errno.h> behaves as if each name from <cerrno> is placed in global namespace.
<fenv.h> behaves as if each name from <cfenv> is placed in global namespace.
<float.h> behaves as if each name from <cfloat> is placed in global namespace.
<inttypes.h> behaves as if each name from <cinttypes> is placed in global namespace.
<iso646.h> behaves as if each name from <ciso646> is placed in global namespace.
<limits.h> behaves as if each name from <climits> is placed in global namespace.
<locale.h> behaves as if each name from <clocale> is placed in global namespace.
<math.h> behaves as if each name from <cmath> is placed in global namespace.
<setjmp.h> behaves as if each name from <csetjmp> is placed in global namespace.
<signal.h> behaves as if each name from <csignal> is placed in global namespace.
<stdalign.h> behaves as if each name from <cstdalign> is placed in global namespace.
<stdarg.h> behaves as if each name from <cstdarg> is placed in global namespace.
<stdbool.h> behaves as if each name from <cstdbool> is placed in global namespace.
<stddef.h> behaves as if each name from <cstddef> is placed in global namespace.
<stdint.h> behaves as if each name from <cstdint> is placed in global namespace.
<stdio.h> behaves as if each name from <cstdio> is placed in global namespace.
<stdlib.h> behaves as if each name from <cstdlib> is placed in global namespace.
<string.h> behaves as if each name from <cstring> is placed in global namespace.
<tgmath.h> behaves as if each name from <ctgmath> is placed in global namespace.
<time.h> behaves as if each name from <ctime> is placed in global namespace.
<uchar.h> behaves as if each name from <cuchar> is placed in global namespace.
<wchar.h> behaves as if each name from <cwchar> is placed in global namespace.
<wctype.h> behaves as if each name from <cwctype> is placed in global namespace.