- 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]

最低0.47元/天 解锁文章
489

被折叠的 条评论
为什么被折叠?



