I have a vector below vector<int> jobs;
Within it I have a bunch of numbers lets say [4,6,2,7,262,15,623,9]
How can i sort this vector from numbers highest to lowest? So that the highest numbers are in the front?
I tried using this but it didnt work. Program crashes.
struct myclass {
bool operator() (int i,int j) { return (i<j);}
} myobject;
std::sort (JobPool.end(), JobPool.begin(), myobject);