The general syntax of the STL sort algorithm is
sort(myvector.begin(),myvector.end()); //used for sorting an array of integers in the ascending order
The code for sorting an array of integers in the descending order is however
I was wondering if we could just use
as they are already defined. Is it legal to do so or will it generate some kind of error? Why create new methods when we already have a method existing to do the exact same thing?