Daily C++: Ranged for loops

Another fun feature of the new C++11 standard is the ranged for loops; again, a convenience that would make the writing of code a bit easier. It was one feature I seen and liked a lot in other languages; it makes the code a lot easier, in a pleasant way.

The for ranged loops are largely equivalent to:

This feature definitely makes the code cleaner, and easier to read.

Comments are closed.