How does one go about sorting a vector containing custom (i.e. user defined) objects. Probably, standard STL algorithm sort along with a predicate (a fu
In your class, you may overload the "<" operator.
class MyClass { bool operator <(const MyClass& rhs) { return this->key < rhs.key; } }