June 2025
Intermediate to advanced
1093 pages
33h 24m
English
Pointers can be considered a special case of iterators, which in turn are part of containers. Iterators are explained in detail in Chapter 24, Section 24.2. Nevertheless, I want to show you how pointers interact with containers because containers like vector, array, and string have already been mentioned.
If you already know everything about raw pointers and C-arrays, then it's also time to consider the principles of iterators. Ultimately, this is quite simple: What the raw pointer is for a C-array, the iterator is for the standard containers—with the difference that you can do more with iterators and standard containers than with pointers and C‐arrays. This is because iterators are implemented as classes ...
Read now
Unlock full access