...

/

Categories

Categories

Iterators can be categorized into three primary types, each with its own advantages.

Their capabilities can categorize iterator. C++ has forward, bidirectional and random access iterators. With the forward iterator, you can iterate the container forward, with the bidirectional iterator, in both directions. With the random access iterator, you can directly access an arbitrary element. In particular, this means for the last one, that you can use iterator arithmetic and ordering comparisons (e.g.: <). The category of an ...