foo.cc: In member function 'Date Date::operator+(int)':
foo.cc:19:38: error: 'class Date' has no member named 'year'
int mon[13]={0,31,28+runnian(this->year),31,30,31,30,31,31,30,31,30,31};
^
foo.cc:19:42: error: 'runnian' was not declared in this scope
int mon[13]={0,31,28+runnian(this->year),31,30,31,30,31,31,30,31,30,31};
^
foo.cc:20:9: error: 'class Date' has no member named 'day'
this->day+=num;
^
foo.cc:21:19: error: 'class Date' has no member named 'month'
while(mon[this->month]<this->day)
^
foo.cc:21:32: error: 'class Date' has no member named 'day'
while(mon[this->month]<this->day)
^
foo.cc:23:10: error: 'class Date' has no member named 'day'
this->day-=mon[this->month];
^
foo.cc:23:25: error: 'class Date' has no member named 'month'
this->day-=mon[this->month];
^
foo.cc:24:10: error: 'class Date' has no member named 'month'
this->month+=1;
^
foo.cc:25:13: error: 'class Date' has no member named 'month'
if(this->month>12)
^
foo.cc:27:11: error: 'class Date' has no member named 'month'
this->month=1;
^
foo.cc:28:11: error: 'class Date' has no member named 'year'
this->year+=1;
^
自豪的采用 HydroJudger 进行评测(github.com/hydro-dev/HydroJudger)