How do I sort a STL vector containing my own class.
I have a class called CObject and a vector
In CObject is a function called GetYPos().
I need to sort the vector so that the Objects with the lowest YPos are first.
I tried using std::sort with the operator < overloaded in CObject but it doesn't work.
Is there any other solutions?