[Previous] [Contents] [Next]

Dinkum C++ Library

Use of this Dinkum C++ Library Reference is subject to limitations. Follow the link to the Copyright Notice, at the bottom of this page, for detailed restrictions.


A C++ program can call on a large number of functions from the Dinkum C++ Library, a conforming implementation of the Standard C++ library as approved in 1998, corrected through 2003, and extended by several (non-normative) Technical Reports. These functions perform essential services such as input and output. They also provide efficient implementations of frequently used operations. Numerous function and class definitions accompany these functions to help you to make better use of the library. Most of the information about the Standard C++ library can be found in the descriptions of the C++ library headers that declare or define library entities for the program.

Table of Contents

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

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

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

<fstream.h> · <iomanip.h> · <iostream.h> · <new.h>

C++ Library Overview · C Library Overview · Characters · Files and Streams · Formatted Output · Formatted Input · Locale Definitions · STL Conventions · Containers


The Standard C++ library consists of 51 required headers. This implementation also includes four additional headers, hardware, <hash_map>, <hash_set>, and <slist>, not required by the C++ Standard, for a total of 54 headers. Of these 54 headers, 16 constitute the Standard Template Library, or STL. These are indicated below with the notation (STL):

<algorithm> -- (STL) for defining numerous templates that implement useful algorithms
<bitset> -- for defining a template class that administers sets of bits
<complex> -- for defining a template class that supports complex arithmetic
<deque> -- (STL) for defining a template class that implements a deque container
<exception> -- for defining several functions that control exception handling
<fstream> -- for defining several iostreams template classes that manipulate external files
<functional> -- (STL) for defining several templates that help construct predicates for the templates defined in <algorithm> and <numeric>
<hardware> [added with TR18015] -- for writing portable I/O hardware drivers in C++
<hash_map> -- (STL) for defining template classes that implement hashed associative containers that map keys to values
<hash_set> -- (STL) for defining template classes that implement hashed associative containers
<iomanip> -- for declaring several iostreams manipulators that take an argument
<ios> -- for defining the template class that serves as the base for many iostreams classes
<iosfwd> -- for declaring several iostreams template classes before they are necessarily defined
<iostream> -- for declaring the iostreams objects that manipulate the standard streams
<istream> -- for defining the template class that performs extractions
<iterator> -- (STL) for defining several templates that help define and manipulate iterators
<limits> -- for testing numeric type properties
<list> -- (STL) for defining a template class that implements a doubly linked list container
<locale> -- for defining several classes and templates that control locale-specific behavior, as in the iostreams classes
<map> -- (STL) for defining template classes that implement associative containers that map keys to values
<memory> -- (STL) for defining several templates that allocate and free storage for various container classes
<new> -- for declaring several functions that allocate and free storage
<numeric> -- (STL) for defining several templates that implement useful numeric functions
<ostream> -- for defining the template class that performs insertions
<queue> -- (STL) for defining a template class that implements a queue container
<set> -- (STL) for defining template classes that implement associative containers
<slist> -- (STL) for defining a template class that implements a singly linked list container
<sstream> -- for defining several iostreams template classes that manipulate string containers
<stack> -- (STL) for defining a template class that implements a stack container
<stdexcept> -- for defining several classes useful for reporting exceptions
<streambuf> -- for defining template classes that buffer iostreams operations
<string> -- for defining a template class that implements a string container
<strstream> -- for defining several iostreams classes that manipulate in-memory character sequences
<typeinfo> -- for defining class type_info, the result of the typeid operator
<utility> -- (STL) for defining several templates of general utility
<valarray> -- for defining several classes and template classes that support value-oriented arrays
<vector> -- (STL) for defining a template class that implements a vector container

The Standard C++ library works in conjunction with the 18 headers from the Standard C library, sometimes with small alterations. The headers come in two forms, new and traditional. The new-form headers are:

<cassert> -- for enforcing assertions when functions execute
<cctype> -- for classifying characters
<cerrno> -- for testing error codes reported by library functions
<cfloat> -- for testing floating-point type properties
<ciso646> -- for programming in ISO 646 variant character sets
<climits> -- for testing integer type properties
<clocale> -- for adapting to different cultural conventions
<cmath> -- for computing common mathematical functions
<csetjmp> -- for executing nonlocal goto statements
<csignal> -- for controlling various exceptional conditions
<cstdarg> -- for accessing a varying number of arguments
<cstddef> -- for defining several useful types and macros
<cstdio> -- for performing input and output
<cstdlib> -- for performing a variety of operations
<cstring> -- for manipulating several kinds of strings
<ctime> -- for converting between various time and date formats
<cwchar> -- for manipulating wide streams and several kinds of strings
<cwctype> -- for classifying wide characters

The traditional Standard C library headers are:

<assert.h> -- for enforcing assertions when functions execute
<ctype.h> -- for classifying characters
<errno.h> -- for testing error codes reported by library functions
<float.h> -- for testing floating-point type properties
<iso646.h> -- for programming in ISO 646 variant character sets
<limits.h> -- for testing integer type properties
<locale.h> -- for adapting to different cultural conventions
<math.h> -- for computing common mathematical functions
<setjmp.h> -- for executing nonlocal goto statements
<signal.h> -- for controlling various exceptional conditions
<stdarg.h> -- for accessing a varying number of arguments
<stddef.h> -- for defining several useful types and macros
<stdio.h> -- for performing input and output
<stdlib.h> -- for performing a variety of operations
<string.h> -- for manipulating several kinds of strings
<time.h> -- for converting between various time and date formats
<wchar.h> -- for manipulating wide streams and several kinds of strings
<wctype.h> -- for classifying wide characters

This implementation also includes one additional headers, not required by the C Standard or the C++ Standard:

<iohw.h> [added with TR18015/TR18037] -- for writing portable I/O hardware drivers in C

Finally, in this implementation, the Standard C++ library also includes several headers for compatibility with traditional C++ libraries:

<fstream.h> -- for defining several iostreams template classes that manipulate external files
<iomanip.h> -- for declaring several iostreams manipulators that take an argument
<iostream.h> -- for declaring the iostreams objects that manipulate the standard streams
<new.h> -- for declaring several functions that allocate and free storage

Other information on the Standard C++ library includes:

C++ Library Overview -- how to use the Standard C++ library, including alternative mechanisms for handling exceptions
C Library Overview -- how to use the Standard C library, including what happens at program startup and at program termination
Characters -- how to write character constants and string literals, and how to convert between multibyte characters and wide characters
Files and Streams -- how to read and write data between the program and files
Formatted Output -- how to generate text under control of a format string
Formatted Input -- how to scan and parse text under control of a format string
Locale Definitions -- how to adapt to different American and European cultures
STL Conventions -- how to read the descriptions of STL template classes and functions
Containers -- how to use an arbitrary STL container template class

A few special conventions are introduced into this document specifically for this particular implementation of the Standard C++ library. Even though the C++ Standard is no longer new, not all implementations support all the features described here. Hence, this implementation introduces macros, or alternative declarations, where necessary to provide reasonable substitutes for the capabilities required by the C++ Standard.


See also the Index.

Copyright © 1992-2006 by P.J. Plauger. All rights reserved.

[Previous] [Contents] [Next]