I need to sort this array by the decreasing order of numPontos. Once it's sorted, if there are multiple positions with an equal number of numPontos, it sorts only them by the decreasing order of diferencaGolos.
It's returning the error C2893: Failed to specialize function template 'unknown-type std::less<void>::operator ()(_Ty1&&,_Ty2 &&) const', but in the external dependecy algorythm.
What do you mean? Does it crash? Does it not compile? Does it not change the order of elements? Does it send your grandmother an email virus? You need to be specific.
Could you repost your current entire code? (use [code] tags too)
I do wonder why you are calling std::sort multiple times - the last time you call it sorts the entire vector, so why even do the partial sorts in the first place?
Why do you have lines 31 and 33? Line 35 does all you need.
How are you verifying that the data is not sorted? Note that you copy the data into the vector from infequipas and that infequipas is never changed. If you want to change infequipas then sort it and forget the vector:
It's sorting now thanks. I had those two extra lines because I took them from the first tutorial that you gave me. I've just started to learn so I still do stupid mistakes like that one.
Ah yes, the issue was that you had copied the data into the vector and sorted the vector, but this didn't affect infequipas at all and that was what you were expecting to get sorted. Glad you've got it working now.