我有class Passanger
变量string name; string station; string ticket;
,然后我有另一个类,在这个类中我有vector<Passanger*> myQueue;
现在我想用stable_sort
排序myQueue
。有没有可能,怎么说呢stable_sort
,应该是什么key,按照它应该排序myQueue
?
std::stable_sort(myQueue.begin(),myQueue.end(), maybeSomethingElse() );
?