#include <iostream>
using namespace std;
class User
{
public:
int age;
int number;
User()
{
cout << "this is User contructor\r\n";
}
User& operator=(const User & uer)
{
cout << "this is User operator =\r\n";
return *this;
}
User(const User &user)
{
cout << "调用拷贝构造函数并为指针 ptr 分配内存" << endl;
}
};int main()
{
User user;
User c;
c=user;
User b=user;
cout << "Hello World";
return 0;
}