for vector code example
Example 1: for loop vector
for (auto i = v.begin(); i != v.end(); i++)
{
std::cout << *i << endl;
}
Example 2: for vector c++
for (auto it = begin (vector); it != end (vector); ++it) {
it->doSomething ();
}