Professional Documents
Culture Documents
Well, you might have faced this problem in your coding life. Also you might know the answer already. The
problem was about the std::map or say std::multimap, both of them are special type of containers who
can sort the items by a comparing function pointer(or a built-in one like std::less). They sort it when you
are inserting a new item, that's of course so handy, because you don't wanna call a sorting function
every time you need to! Actually you will never explicitly call any sorting function on your map or
multimap, coz it's already sorted! Now here's my problem-
Say, I have a map like this -
D - 1
D - 2
B - 3
A - 4
A 4
B 3
D 2
D 1
Ok, I apologize for my undocumented code :) But it's not so hard to read actually. Is it ?