The STL provides a set of algorithms that can be used along with the containers that it also supplies. These algorithms all work with iterators. An iterator is an abstraction mechanism that allows traversal behavior on many different STL collections. This chapter covers iterators and some of different algorithms along with their uses.
Recipe 8-1. Using an Iterator to Define a Sequence Within a Container
Problem
You have an STL container and would like to mark a sequence within that container that begins and ends ...