#include<iostream>
#include<string>
using namespace std;
class Date
{
private:
int year,month,day;
string *p;
public:
Date(int a=2020,int b=1,int c=1): year(a),month(b),day(c)
{
p=new string;
}
Date(const Date& b)
{
year=b.year;
month=b.month;
day=b.day;
p=new string;
*p=*(b.p);
}
~Date(){
cout<<year<<"析构"<<endl;
delete p;
}
void set()
{
cout<<"修改后年、月、日:";
cin>>year>>month>>day;
}
};
int main()
{
Date a;
Date b(a);
b.set();
return 0;
}