I have below map code in C++-
std::map<std::string, std::string> vals;
vals["%"] = "PERCENT";
vals["$"] = "DOLLAR";
vals["="] = "EQUAL";
With above code lines I expect % will be at index 0 and $ at index 1. But when I compile and debug I always find $ at index 0 and % at index 1.
anybody has any idea why this is happening? maintaining sequence is must for me , any suggestion how can I get rid of it.