struct bvp{
unsigned b;
unsigned v;
unsigned p;
};
vector bvpVec;
Now I want to sort the vector bvpVec first by b and then by v. I am able to sort using std::sort() using b only. But I am not getting how can I use bvpVec to sort first by b and then by p. E.g. if my vectors are:
(b,v,p)
(1,4,2)
(0,82,0)
(55,1,0)
(0,81,0)
(2,30,0)
Then I want to sort as follows:
(b,v,p)
(0,81,0)
(0,82,0)
(1,4,2)
(2,30,0)
(55,1,0)
Also my vector bvpVec is large, so it will be add on if anyone can suggest any sorting procedure which is faster than std::sort() for my case.