c++ for loop different way
Recently, I round a beautiful way to output a vector from
std::partition_point.
std::cout << "odd:";
for (int& x:odd) std::cout << ' ' << x;
std::cout << '\n';
Could anyone give a short description how it works and why it works? I
would appreciate if someone could find this usage of for loop in
documentation, unfortunately I didn't find it on
http://www.cplusplus.com/.
No comments:
Post a Comment