map<string,int> nmap; nmap["LiMin"] = 90; nmap["ZiLinMi"] = 79; nmap["BoB"] = 92; nmap.insert(make_pair("Bing",99)); nmap.insert(make_pair("Albert",86)); //把map中元素转存到vector中 vector<PAIR> vec(nmap.begin(),nmap.end()); sort(vec.begin(), vec.end(), cmp); /...
map<string,int> nmap; nmap["LiMin"] = 90; nmap["ZiLinMi"] = 79; nmap["BoB"] = 92; nmap.insert(make_pair("Bing",99)); nmap.insert(make_pair("Albert",86)); //把map中元素转存到vector中 vector<PAIR> vec(nmap.begin(),nmap.end()); sort(vec.begin(), vec.end(), cmp); /...