May the FORs be with you

Loops are among the basic constructs you find in nearly all programming languages. Of the available variations,  for loops are the most common ones. The word  for is so small that it is not affected by the tax on long keywords and variable names that programming languages seem to be subject of. Thus, you will find  for as a keyword in most of them.

C++11 supports a multitude of styles to write  for loops. Let us have a look at some of these possibilities for a simple example.

Continue reading “May the FORs be with you” »