As mentioned earlier, the iterator is the abstraction that allows a piece of code to be generic , and to work with different types of containers without knowing the underlying structure of those containers.
Every container produces iterators.
An iterator can be used to produce the element that it is currently selecting within a container by dereferencing the iterator. This can take two forms. However, things can at times become more subtle, and in those cases you need to know more about iterators. The rest of this section gives you the details. Iterators in reversible containers All containers must produce the basic iterator .