Its that time again. time for another one of my weird questions. This one is a real gem. Im plotting to write my own foreach function (ya im a perl nut, tuff.) however writing a function that takes code i guess in {}'s isnt exactly standard material for C++ books to cover. Im not even sure what to call this type of function. the end result im aiming for is something like:
foreach(T bob, vector<T>) { dothis(with bob); }
my thoughts were templating as much as i can so it could take arrays or vectors or possibly other STL containers. am i completely nutty in wanting to write my own looping function? or is this even do-able? oh well, im dieing to hear what you guys have to say.
me.