This may seem frivolous to some of you, but which of the following 2 methods of iteration over a STL container is better? Why?
If you don't mind a (very?) small loss of efficiency, i'd recommend using Boost.Foreach
BOOST_FOREACH( Elem& e, elemVec ) { // Your code }