#includeusing namespace std; class Square{ public: double operator()(double x)const{ return x * x; } int operator()(int a,int b,int c=0)const{ return a+b-c; } }; int main(void){ Square sq; //括号里面的参数会被自动当作形参传入 cout << sq(12) << endl; //144 cout << sq(1,5,3) << endl; //3 cout << sq(1,3) << endl; //4 return 0; }
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款