sort自定义类型排序

一个很简单的问题,不过也磨了我好一会,在些总结记录。数据结构 1. 对于不用写自定义数据结构的状况:函数 static int cmp(const pair<string, int>& x, const pair<string, int>& y) spa {string if (x.second != y.second) it return x.second > y.second; map els
相关文章
相关标签/搜索