Iterators


An iterator is a generalized pointer used to traverse the elements of a collection, whether they are contained in an STL container, a regular C array, or a C++ IOStream. At any point in time, an iterator is positioned at exactly one place in a collection and remains positioned at that location until instructed to move.

This chapter provides an overview of iterators, as well as the topics listed below.

STL Iterators and Regular C Pointers

Categories of Iterator

Hierarchy of Iterators

Iterator Behaviors

Using Basic Iterators

Const Iterators

Reverse Iterators

Random Access Iterators


Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.