B
BCC
Hi,
I'm looking for some way to do a multiple sort on a vector of objects based
on the contents of the objects. For example if my vector is of these
objects:
class MyClass
{
public:
double value1;
double value2;
double value3;
};
So I would want to sort by each value in combination...
Is there an existing function to do this already somewhere? Do I need to
roll my own? Any suggestions for the fastest algorithm to use for this
(websites or books)?
Thanks,
B
I'm looking for some way to do a multiple sort on a vector of objects based
on the contents of the objects. For example if my vector is of these
objects:
class MyClass
{
public:
double value1;
double value2;
double value3;
};
So I would want to sort by each value in combination...
Is there an existing function to do this already somewhere? Do I need to
roll my own? Any suggestions for the fastest algorithm to use for this
(websites or books)?
Thanks,
B