January 2018
Intermediate to advanced
374 pages
9h 53m
English
All algorithms take a pair of iterators, where the first one points to the first element in the range and the second one points to one element beyond the last element in the range. Take a look at the following code snippet:
auto vec=std::vector<std::string>{ "a","b","c","d","e","f"};auto first = vec.begin();auto last = vec.end(); |
![]() |
As seen in the image, the last iterator now points to an imagined element after "f":