Link to home
Start Free TrialLog in
Avatar of ROWANBRIGHTON
ROWANBRIGHTON

asked on

Sort pointers in container

I have a container with pointers that I'm trying to sort.

How do you sort a container of pointers?

class XObject
{
public:
int xyz;
};

list<XObject*> ptrListOfXObject;

How do I sort ptrListOfXObject in order of xyz data member?
ASKER CERTIFIED SOLUTION
Avatar of Axter
Axter
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial