loop for(int s:v) what does it mean?

Feb 13, 2017 at 7:13pm
Hello,
I'm reading Stroustrup book PPP using C++

And here I saw such loop for(int s : v){}
What does it mean such notation?

Thanks
Feb 13, 2017 at 7:16pm
That is a ranged based loop.

See: http://en.cppreference.com/w/cpp/language/range-for for more information.
Feb 13, 2017 at 7:26pm
Thanks
Topic archived. No new replies allowed.