G
Gary Wessle
dear programmers
I am in need of some help please.
I am trying to sort vector<time_t> assending.
the following is by best go but needs some guide.
struct assending : public binary_function<time_t, time_t, bool> {
bool operator()(time_t x, time_t y) {
return x > y;
}
}
sort(time_vec.begin(), time_vec.end(), assending());
will this be the correct way to do it?
thanks
I am in need of some help please.
I am trying to sort vector<time_t> assending.
the following is by best go but needs some guide.
struct assending : public binary_function<time_t, time_t, bool> {
bool operator()(time_t x, time_t y) {
return x > y;
}
}
sort(time_vec.begin(), time_vec.end(), assending());
will this be the correct way to do it?
thanks