for vector c++
vector<int> vi;
...
for(int i : vi)
cout << "i = " << i << endl;
3.75
4
for (auto it = begin (vector); it != end (vector); ++it) {
it->doSomething ();
}
Thank you!
4
0
3.11
9
std::vector<int>::iterator it = vector.begin();
Thank you!
9
0
Are there any code examples left?
New code examples in category C++