Iterators: an ADT for Positions

Steven J. Zeil

Old Dominion University, Dept. of Computer Science

Table of Contents

1. The Abstraction: Position
1.1. Change the data structure
1.2. Please Don't Bias the Implementators
2. The C++ iterator
2.1. Starting and Ending Positions
2.2. Names for iterator types
2.3. Adding an Iterator to the Book Interface
2.4. Iterators as Search Results
2.5. Implementing the Iterator
2.6. But it's so ugly!
2.7. Some Iterators are Easy
2.8. Variations

In this lesson we introduce one of the fundamental building blocks of the C++ standard library: the iterator.


In the Forum:

(no threads at this time)