定义一个类,重载函数运算符
#include "module2.h"
#include "module2.h"
int fun_class::operator()(int x,int y){
cout<<"This is the function instance.\n";
cout<<x+y<<endl;
}
fun_class::fun_class()
{
}
fun_class::~fun_class()
{
}
void main_2(){
fun_class f1;
thread t(f1,2,3);
t.join();
}