9 Feb
2007
9 Feb
'07
5:25 p.m.
Hi, I have code like this which sort a Rect, which compare value of getY(), like this: vector<Rect*> rl; ::sort(rl.begin(), rl.end(), bind(less < int >(), bind(&Rect::getY, _1), bind(&Rect::getY, _2))); how can I change it so that it compares with the 'y' attribute? like, rect1.y < rect2.y? Thank you.