求C++中比较两个数的大小的库函数
答案:2 悬赏:80 手机版
解决时间 2021-01-28 08:06
- 提问者网友:难遇难求
- 2021-01-27 11:49
急着要用
最佳答案
- 五星知识达人网友:话散在刀尖上
- 2021-01-27 11:59
template
struct greater : public binary_function {
bool operator()(const T& x, const T& y) const;
};
struct greater : public binary_function
bool operator()(const T& x, const T& y) const;
};
全部回答
- 1楼网友:动情书生
- 2021-01-27 12:38
你好!
直接自己写个呗
bool greater(int lhs, int rhs)
{
return lhs > rhs;
}
或者你实在要用std::greater也可以这样:
bool test = greater()(1, 2);
希望对你有所帮助,望采纳。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯