Chapter 42 Flashcards
What are iterators
STL iterators provide pointer operations such as * and ++
What are categories of iterators
- Input iterators
- Output iterators
- Forward iterators
- Bidirectional iterators
- Random-access iterators
What is input iterator
Can read only an element. Can only move forward in one direction
What is output iterator
Can only write an element. Can only move forward direction one element at a time
What is forward iterator
Combine the capabilities of both input and output iterator
What is bidirectional iterator
Have all functionality of forward iterator. Additionally, they also move backward.
What is random-access iterator
Provides all capabilities of bidirectional iterators. Plus they can directly access any element of a container
What is -> operator
Access operator
What is *p
dereference operator
How much standard algorithm STL have
70
What are STL algorithm
STL algorithm may use iterator to manipulate container