Original Post
Hi all, Although I am pretty familiar with c++, I mostly avoided using STL, but as of late I have found it to be very useful and invaluable, however, I find the documentation for it to be quite cryptic. Anyways, I want to create a standard map using a alternative sorting function. I understand that a map is by default sorted by the key value, However, I'd like to sort it by it's data value, for example: Suppose I have a map of names (key) and an int (data) Tom 10 Dick 20 Harry 30 Darryl 40 by default the map will be sorted alphabetically by name (key) I would like it to be sorted as listed above, by data value. I have looked at using the value_compare member, but am lost as to what I need to do and have not found any simple/clear examples on the net. Any assitance would be appreciated. Thanks, Darryl