...

/

Useful Functions

Useful Functions

C++ offers several tools to make the iteration process simpler yet safer.

The global functions std::begin, std::end, std::prev, std::next, std::distance and std::advance make your handling of the iterators a lot easier. Only the function std::prev requires a bidirectional iterator. All functions need the header <iterator>. The table gives you an overview:

Global function
...