Range-based for loops with counters
In C++11 we got range-based for loops which allow one to iterate over the elements of a container easily. In some situations, however, having sequential access to each element of the container is not sufficient for the task that shall be done in the loop body. Commonly an additional counting index is required. In this… Continue reading Range-based for loops with counters