Does anyone know that is there a way that I can change the map order from less to kind of "more"?
There is a map<string, int> called test
test["b"] = 1;
test["a"] = 3;
test["c"] = 2;
Inside the map, the order will be
I want it to be
How can I do that in a easy way? Please anyone who knows that tell me how.
A_ traverse it backwards (reverse iterators)
1_ use the third template argument, by instance std::greater
\alpha_ don't care
Last edited on
@ne555 Thank you for your answer, the second method. That's what I exactly need :)
Thank you @LowestOne as well.