- map默认是升序 即最小的在前面
- 降序(最大的在前面):
std::map<int, std::string, greater<int>> mapgreater;
- 升序(最小的在前面): std::map<int, std::string, less> mapless; // 升序
#include <iostream>
#include <string>
#include <map>
int main()
{
std::map<int, std::string, std::greater<int>> mapgreater; // 降序
mapgreater[90]