#include<iostream>
using namespace std;
class Date{
public:
Date(int Y,int m,int d)
{
year=Y;
month=m;
day=d;
}
void printDate();
void GetYear()
{
cout<<year<<endl;
}
void GetMonth()
{
cout<<month<<endl;
}
void GetDay()
{
cout<<day<<endl;
}
Date(const Date& q)
{year=q.year;
month=q.month;
day=q.day;
}
private:
int year;
int day;
int month;
};
void Date::printDate ()
{ cout<<year<<"年"<<month<<"月"<<day<<"日"<<endl;
}
int main()
{
Date d1(2010,6,8);
d1.printDate();
Date d2(2015,11,11);
d2.printDate();
Date d3(d1);
d3.printDate();
return 0;
}
09-05
09-05