I am trying to sort a 2D vector with the type:
vector<pair<char, double>> output;
I am trying to arrange them from the highest to lowest double value and only displaying the top 5. This is what I am trying to do:
sort(output.begin(), output.end());
But this sort is not working properly for me. What am I doing wrong?