struct greater
{
template <typename T>
bool operator() (const T &a, const T &b) {return a > b;}
};
sort(str_vec.begin(), str_vec.end(), greater()); //使用示例
参考:
struct greater
{
template <typename T>
bool operator() (const T &a, const T &b) {return a > b;}
};
sort(str_vec.begin(), str_vec.end(), greater()); //使用示例
参考: