Iterator type
An iterator is an object that "can traverse all elements within a sequence." It can do its job through an interface that is consistent with the general pointer.
Different iterators have different "capabilities" (travel and access capabilities)
I nput iterators
The input iterator can only read elements one at a time, passing back the element values in this order.
Almost all iterators have the ability to input iterators and are usually stronger. A typical example of a purely input iterator is an iterator that reads data from a standard input device.
The following table lists the various operational behaviors of the input iterator
Output iterator
The output iterator, instead of the input iterator, works by writing element values one after the other.
The following table lists the various operational behaviors of the output iterator
Forward (forward) iterator
The forward iterator is a combination of the input iterator and the output iterator, with the full functionality of the input iterator and most of the functionality of the output iterator, which summarizes all the operations of the forward iterator
Bidirectional (bidirectional) iterator
The bidirectional iterator adds the ability to traverse backwards on the basis of the forward iterator. In other words, it supports the decrement operator for a step-by-step fallback operation
Random access (discretionary access) iterator
The random access iterator builds on the bidirectional iterator and adds the ability to randomly access the device. Therefore, it must provide an "iterator arithmetic operation" (to add and subtract an offset, to handle the distance problem).
The following is a list of new actions for the random access iterator
STL Learning Notes (iterator type)