Categories
Iterators can be categorized into three primary types, each with its own advantages.
We'll cover the following...
Iterators can be put into three categories according to their capabilities. C++ has forward, bidirectional, and random access iterators. With the forward iterator, we can iterate the container forward, with the bidirectional iterator, in both directions. With the random access iterator, we can directly access an arbitrary element. In particular, this means for the last one, we can use iterator arithmetic and ordering comparisons (e.g.: <
). The ...