Iterators
An iterator is an object (a pointer) that keeps track of the current element in a container.
Iterators are useful for inspecting all elements in the container (e.g., all element of a list).
Iterators come in various forms, for example, they can:
Move forward (only), backwards (only), or bi-directionally
Allow changes to the elements they reference (mutable) or not (constant iterators)
All container classes (e.g., lists, vectors, stacks, etc.) have iterators; although they are most commonly used for lists.
An example of the list iterator appears in the example for lists, list.cpp.