I have class Passanger
that has variables string name; string station; string ticket;
and then I have another class and within this class I have vector<Passanger*> myQueue;
now I want to use stable_sort
to sort myQueue
. Is there any possibility, how to say to stable_sort
, what should be the key, according to it shall sort myQueue
?
std::stable_sort(myQueue.begin(),myQueue.end(), maybeSomethingElse() );
?