Sorting a Map
I am attempting to sort a map<string,int> varName
i tried using the std sort with the built in iterators
|
std::sort(words.begin(), words.end());
| |
but it gave me an error 'std::_Sort_unchecked
so how do i go about it?
Maps are sorted.. arnt they.. garsh.
A std::map is always sorted by its keys, by definition.
Topic archived. No new replies allowed.