5 14 20
3 2 40
3 2 26
If we wanted earliest times to have the highest priority, we
would redefine CompareTime like
this:
class CompareTime {
public:
bool
operator()(Time& t1, Time& t2) // t2 has highest prio than t1
if t2 is earlier than t1
{
if (t2.h < t1.h) return true;
if (t2.h == t1.h && t2.m < t1.m) return true;
if (t2.h == t1.h && t2.m == t1.m && t2.s < t1.s)
return true;
return false;
}
};