I want to make a program that is able to sort names in alphabetical order(no, it's not a homework). Since my mother tongue is not English, but Hungarian, we have some characters that are in our alphabet at the beginning, but their value is more in the ASCII table, and some letters are made of two or three characters, so the normal sort function is not suitable for me.
So, I want to store the letters of the alphabet in a map<string, int> structure. I'm in the beginning phase of the program, and now I just want it to write to the screen the alphabet. I use const_iterator for going through the map, but the map stores the values ordered by the KEY. However the value of the map should "tell" the position of the letter in the alphabet. So, my question is: How to make the map order/sort the elements by the VALUE? I tried the reference here, I tried the book from Bjarne Stroustrup, but nothing helped, nothing worked (or I just didn't understand), I'm desperate. Any help would be appreciated. Thanks in advance!