摘要: 如果一个类重载了运算符“()”,则该类的对象被称为函数对象。 clas CMyAverage{ public: double operator()(int a1,int a2,int a3){ return (double)(a1+a2+a3)/3; } }; CMyAverage average; 阅读全文
posted @ 2020-07-08 16:25 wsl96 阅读(104) 评论(0) 推荐(0) 编辑