Have a look
VectorMap<String, int> involved_nodes;
DUMPM ( involved_nodes );
StableSort ( involved_nodes.Begin(), involved_nodes.End(), lip );
DUMPM ( involved_nodes );
Stable sort does not seem copy key value pairs correctly for maps.
stablesortbykey is better... but then value information is lost..
I mean
before the operation stablesortbykey
we have key/value pair
(tester_withdraw_when) 0
after the operation
(tester_withdraw_when) 3
So the unity of key/pair is not kept... the key loses its value to something else.
#include <Core/Core.h> using namespace Upp; CONSOLE_APP_MAIN { VectorMap<int, String> map; for(int i = 0; i < 100; i++) { int n = Random(200); map.Add(n, FormatIntRoman(n) + " " + AsString(n) + " " + AsString(i)); } DUMPM(map); StableSortByKey(map); DUMPM(map); }