函数操作数()
可以实现将对象当函数使用。
1 class Square{ 2 public: 3 double operator()(double x)const{return x*x;} 4 };