I want to traverse an STL map. I don\'t want to use its key. I don\'t care about the ordering, I just look for a way to access all elements it contains. How can I do this?
You can traverse STL map in the same way as any other STL container: using iterators, e.g.
for (std::map::const_iterator i = myMap.begin(), end = myMap.end(); i != end; ++i) { // *i is a key-value pair }