Here is some C++ code I\'m playing around with:
#include #include #define IN , #define FOREACH(x,y) for(unsigned int i=0;i&l
Check out BOOST_FOREACH - it does what you want
http://www.boost.org/doc/libs/1_35_0/doc/html/foreach.html