If you're using a std::map, it's already sorted by the key. Just create an iterator and iterate over the map from begin() to end() and you're done.
If you'd like to sort by something other than the map key, you can use the same iterator and push a copy of each element onto your vector as you iterate over the map.