Blog

A little... extension for C++

2010-08-23 18:13:44

Loops are used on a daily base by almost every programmer. Especially for-loops occur quite often.

Now, have you ever felt it's quite cumbersome to code something like the following:

for (int i=0; i<10; ++i){
  do_something_here();
}

while you just wanted to write

10 times {
  do_something_here();
}

and wanted C++ to understand it?

Don't worry, here's the solution. Just include this little header file and everything will work fine.

read on
[ , c++, fun ]