Standard C++ Library Class Reference

Iterators are a generalization of pointers that allow a C++ program to uniformly interact with
different data structures. The illustration below displays the five iterator categories defined by
the standard library, and shows their heirarchical relationship. Because standard library iterator
categories are hierarchical, each category includes all the requirements of the categories above
it.
Because iterators are used to traverse and access containers, the nature of the container
determines what type of iterator it generates. And, because algorithms require specific iterator
types as arguments, it is iterators that, for the most part, determine which standard library
algorithms can be used with which standard library containers.
To conform to the C++ standard, all container and sequence classes must provide their own
iterators. An instance of a container or sequence's iterator may be declared using either of the
following:
class name ::iterator
class name ::const_iterator