#include <iostream>
#include<stdlib.h>
using namespace std;
#include <stdio.h>
#include<string>
class My
{
public:
void operator()(string test)
{
cout<<test<<endl;
}
};
class Myadd
{
public:
int operator()(int num1,int num2)//匿名对象
{
return num1+num2;
}
};
void test02()
{
Myadd myadd;
myadd(100,100);
int ret=myadd(100,100);
cout<<ret<<endl;
cout<<Myadd()(100,100)<<endl;
}
void test01()
{
My my;
my("hello ");
}
int main()
{
//test01();
test02();
system("pause");
return 0;
}