#include<iostream>
#include<stdlib.h>
using namespace std;
class Date{
friend ostream &operator<<(ostream &output,Date &d);
public:
Date(int y=2017,int m=5,int d=31){
m_iY=y;
m_iM=m;
m_iD=d;
}
Date operator +(int num);
private:
int m_iY,m_iM,m_iD;
};
ostream &operator<<(ostream &output,Date &d){
output<<d.m_iY<<"-"<<d.m_iM<<"-"<<d.m_iD;
return output;
}
Date Date::operator +(int num){
Date d(*this);
d.m_iD+=num;
return d;
}
int main(){
Date d;
Date d1=d+1;
cout<<d+1<<endl;
system("pause");
return 0;
}