NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
~~~ class Complex{ public: int Add(int x,int y){ return x + y; } int operator()(int x,int y){ return x + y; } }; void test01(){ Complex complex; cout << complex.Add(10,20) << endl; //对象当做函数来调用 cout << complex(10, 20) << endl; } ~~~