I inserted the elements to the unordered_map with this code:
unordered_map
myMap.insert(std::make_pair(\"A\", 10)); myMap.insert(std::make_pair(\"B\", 11
No, it is not possible.
Usage of std::unordered_map doesn't give you any guarantee on element order.
std::unordered_map
If you want to keep elements sorted by map keys (as seems from your example) you should use std::map.
std::map
If you need to keep list of ordered pairs you can use std::vector>.
std::vector>