Every C++ programmer has, at one time or another, probably written a linked list or set, searching and sorting routines.
Probably the programmer has re-invented the wheel for every new user-defined data type.
Design changes are not easy to implement in such cases. Maintaining such code is not very easy.
If the common programming components were part of the C++ language, programmers would not need to re-invent the wheel.
Finally, the C++ language, provides you with general purpose components for common programming tasks through the
Standard C++ Library. The Standard C++ Library provides powerful and flexible containers,
programmable algorithms, and other components which are efficient and extensible. Several Standard C++ library components are
defined using C++ templates.
The Standard C++ Library can be divided into the following main components.
- The Standard Template Library, more commonly referred to as STL
- The Iostream Library
- The String Classes
- Utilities
- Localization
- The Numerics Library
- Language Support
- The Standard C Library
The following paragraphs explain each component briefly.
- The Standard Template Library (STL)
- STL provides the user containers, algorithms, and iterators.
Containers are used to organize data. Examples of containers provided by STL: vector, list, map.
Iterators allow the user to access/operate on data stored in the containers. They are like C++ pointers.
Algorithms use iterators to access data stored in containers.
Algorithms are template functions which provide routines for sorting, searching, and editing.
- The Iostream Library
- The Iostream Library provides the user routines for input/ouput. It consists of the base iostream classes,
stream buffering, stream formatting and manipulators, string streams, and file streams.
- The String Classes
- The string component provides a template class, basic_string<CHARTYPE>,
which provides the means for manipulating sequences of "characters." The template parameter
(CHARTYPE) defines the character type, which might be char, w_char, or any other integral
data type in C++. The string and wstring types are pre-defined instantiations provided by the library.
- Utilities
- The utilities provide helper functions which are used by various components of the
Standard C++ Library. Utilities include: templated comparison operator functions, function objects,
dynamic memory management utilities, and date/time utilities.
- Language Support
- Language support includes common type definitions, characteristics of pre-defined types, functions
supporting start and termination of a C++ program, support for dynamic type identification, support for exception
processing, and other runtime support.
- Localization
- Localization provides the user classes and function for character classification, string collation,
numeric format, monetary format, and date/time formatting and parsing.
- Numerics Library
- The Numerics Library provides classes and functions for components to perform semi-numerical operations,
complex number types, numeric arrays, and generalized numeric algorithms.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.