12
使用值对std :: map进行排序
我需要std::map按值而不是按键排序。有一个简单的方法吗? 我从下面的线程中得到了一个解决方案: std :: map按数据排序? 有更好的解决方案吗? map<long, double> testMap; // some code to generate the values in the map. sort(testMap.begin(), testMap.end()); // is there any function like this to sort the map?
71
c++
dictionary
std