You are viewing a single comment's thread. Return to all comments →
bool compare(Player a,Player b){ if(a.score!=b.score){ return a.score>b.score; } else return a.name<b.name; } vector<Player> comparator(vector<Player> players){ sort(players.begin(),players.end(),compare); return players; }
it's simple. isn't it?
Seems like cookies are disabled on this browser, please enable them to open this website
Sorting: Comparator
You are viewing a single comment's thread. Return to all comments →
my c++ code:
it's simple. isn't it?