Posts

Showing posts from November, 2015

Enumerating Range For in C++11

C++11 has introduced range-for loops that greatly simply the loop process over STL containers and other iterable entities such as arrays or initializers_lists. While this comes handy some times it is needed to have the index of the iterated entity for performing some other operations. The Python equivalent is enumerate.