for in c++ vector code example
Example 1: for vector c++
std::vector<int>::iterator it = vector.begin();
Example 2: for vector c++
for (auto it = begin (vector); it != end (vector); ++it) {
it->doSomething ();
}
std::vector<int>::iterator it = vector.begin();
for (auto it = begin (vector); it != end (vector); ++it) {
it->doSomething ();
}