STL tutorial reference chapt 7 iterators

Source: Internet
Author: User
ArticleDirectory
    • 7.2.1 input iterators
Chapt 7 iterators7.1 header file

Each container defines their own iterator type, so you usually do not need special header files to use iterator. However, there are several special iterator, such as reverse iteratos, which are defined in the header file <iteraor>. Similarly, you do not need to include this header file by yourself. They are already included by containers to define their own specific iterator.

7.2 iterator categories

Iterator category Ability Provider
Input iterator Read, forward Istream
Output iterator Write, forward Ostream, inserter
Forward iterator Read/write, forward  
Bidirectional iterator Read/write, forward/backward List, set/Multiset, MAP/multimap
Rabdin access iterator Read/write, Random Access Vector, deque, String, array
7.2.1 input iterators

Supported operations:

Operation Input iterator Output iterator Forward iterator Bidirectional iterator Random Access iterator
* ITER  
ITER-> Member  
* Iter = Value  
Iter1 = iter2    
++ ITER
ITER ++
-- ITER      
ITER --      
Iter1 = iter2  
Iter1! = Iter2  
ITER [N]        
ITER + = N        
ITER-= N        
ITER + n        
N + ITER        
ITER-n        
Iter1-iter2        
Iter1 <iter2        
Iter1> iter2        
Iter1 <= iter2        
Iter1> = iter2        
Type (ITER)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.