#include<iostream>
using namespace std;
class person{
public:
//构造函数
person (){
cout<<"person无参构造函数"<<endl;
}
person(int a){
cout<<"person有参构造函数"<<endl;
}
//拷贝函数
person (const person &p){
age=p.age;
cout<<"拷贝函数的构造"<<endl;
}
//~person(){
// cout<<"person析构函数的调用"<<endl;
//}
int age;
};
void test1(){
person p;//调用无参构造函数
cout<<1<<endl;
}
void test2(){
person p1(10);
cout<<2<<endl;
}
int main(){
test1();
test2();
return 0;
}