摘要:
一、代码实现: class Yoba { public: Yoba(int n) : _n(n) {} Yoba operator() (int n) { return Yoba(_n + n); } bool operator== (int n) { return _n == n; } int o 阅读全文
posted @ 2019-11-04 19:14
星光夜
阅读(1307)
评论(0)
推荐(0)
摘要:
转载:http://blog.sina.com.cn/s/blog_4b3c1f950100kker.html operator是C++的关键字,它和运算符一起使用,表示一个运算符函数,理解时应将 operator= 整体上视为一个函数名。 这是C++扩展运算符功能的方法,虽然样子古怪,但也可以理解 阅读全文
posted @ 2019-11-04 19:09
星光夜
阅读(247)
评论(0)
推荐(0)

浙公网安备 33010602011771号