Iterator Operation Instructions
(1) All iterators
p++ Post-built self-increment iterator
++p forward self-increment iterator
(2) Input iterator
*p Complex reference iterator, as Rvalue
P=p1 assigning an iterator to another iterator
P==P1 comparison of equality of iterators
P!=p1 comparison of the inequality of iterators
(3) Output iterator
*p Complex reference iterator, as Lvalue
P=p1 assigning an iterator to another iterator
(4) Forward iterator
Provides all the functions of an input-output iterator
(5) Bidirectional iterator
--p pre-built-in self-reducing iterators
p--post-offset self-reducing iterator
(6) Random iterators
P+=i increments the iterator I bit
P-=i decrements the iterator i-bit
P+i iterator after P-bit plus I-bit
P-i iterator after P-bit minus I bit
P[i] Returns the element reference of the P-bit element deviating from the I bit
P<P1 returns True if the position of the iterator P is before P1, otherwise false
Returns true if the position of the P<=P1 P is in front of the P1 or in the same position, otherwise false
P>P1 returns True if the position of the iterator P is P1, otherwise false
P>=P1 P's position returns true at the back of the P1 or in the same position, otherwise false
Only sequential containers and associative containers support iterator traversal, and the categories of iterators supported by each container are as follows:
Iterator categories supported by container-supported iterator category containers for containers
Vector random Access deque random access list bidirectional
Set bidirectional multiset bidirectional map double To
Multimap bidirectional stack does not support queue not supported
Priority_queue not supported
Relationships between five iterators for C + +