Hey there!
I think everyone know what does this piece of code do:
vector <int> v = {1, 2, 3, 4};
for (int x : v)
cout << x << " ";
prints: 1 2 3 4
Is there any way to do this in reverse order ?!
Range-based for loop in C++
Hey there!
I think everyone know what does this piece of code do:
vector <int> v = {1, 2, 3, 4};
for (int x : v)
cout << x << " ";
prints: 1 2 3 4
Is there any way to do this in reverse order ?!