- 链接地址:https://blog.csdn.net/lianghe_work/article/details/106087358
- 链接标题:39_函数调用符()的重载-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:1250
#include <iostream>using namespace std;class Fun{public: int my_add(int x,int y) { return x+y; } //重载() //第一个()是重载的符号 第二个()是标明要传参 int operator()(int x,int y) { return x+y; }};void test01(){ .
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除