How to use iterators in C++ vector?

An iterator is used to move through the elements of a C++ Standard Library container (vector, set, map etc.). It is analogous to array indexes or pointers. This pointer-like object that can be incremented or decremented, de-referenced (using *), and compared against another iterator. Vector iterators are random-access iterators, meaning, they can be used to …

How to use iterators in C++ vector? Read More »