M
mrNoob
sorry iam only coding for a month
i want to sort "personS" on there "score". how can i do this using
the code below ? ,, i keep having errors
class person
{
public:
person();
// etc...
private:
int age;
int score; // sort on score
// etc...
};
int main()
{
person *personS; // to be sorted
personS = new person[10];
sort(personS, personS+10, ??? ); // ? QUESTION HERE ?
return(1);
}
plz dont be too absract :/
i want to sort "personS" on there "score". how can i do this using
the code below ? ,, i keep having errors
class person
{
public:
person();
// etc...
private:
int age;
int score; // sort on score
// etc...
};
int main()
{
person *personS; // to be sorted
personS = new person[10];
sort(personS, personS+10, ??? ); // ? QUESTION HERE ?
return(1);
}
plz dont be too absract :/