class date
{ int _year;
int _month;
int _day;
};
ostream& operator<<(ostream& cout, const date& d);
istream& operator>>(istream& in,date& d);
ostream& operator<<(ostream& out, const date& d)
{
out<< d._year << "年" << d._month << "月" << d._day << "日"<<endl;
return out;
}
istream& operator>>(istream& in, date& d)
{
cout << "请输入日期";
in >> d._year >> d._month >> d._day;
return in;
}