A common pattern with STL containers is this:
map map; for(map::iterator iter = map.begin(); iter != map.end(); ++iter) { .
You can use Boost.Foreach