Iterators Are Fundamental
Get an idea about the basics of iterators in C++ 20.
We'll cover the following
Iterators are a fundamental concept in the STL. Iterators are implemented with the semantics of C pointers, using the same increment, decrement, and dereference operators. The pointer idiom is familiar to most C/C++ programmers, and it allows algorithms such as std::sort
and std::transform
to work on
The STL uses iterators to navigate the elements of its container classes. Most containers include begin()
and end()
iterators. These are usually implemented as member functions that return an iterator object. The begin()
iterator points to the initial container element, and the end()
iterator points past the final element:
Get hands-on with 1400+ tech skills courses.