foo.cc:1:33: error: 'gapday' does not name a type
1 | gapday += 365;
| ^~~~~~
foo.cc:2:9: error: expected declaration before '}' token
2 | }
| ^
foo.cc:3:9: error: expected unqualified-id before 'return'
3 | return gapday;
| ^~~~~~
foo.cc:4:1: error: expected declaration before '}' token
4 | }
| ^
foo.cc: In function 'int month(int, int)':
foo.cc:8:14: warning: statement has no effect [-Wunused-value]
8 | for (month1; month1 < month2; month1++)
| ^~~~~~
foo.cc: In function 'int main()':
foo.cc:37:9: error: 'cin' was not declared in this scope
37 | cin >> year1 >> month1 >> day1;
| ^~~
foo.cc:39:9: error: 'cout' was not declared in this scope
39 | cout << year(year1, year2) <<" " << month(month1, month2) <<" " << day(day1, day2);
| ^~~~
foo.cc:39:17: error: 'year' was not declared in this scope; did you mean 'year2'?
39 | cout << year(year1, year2) <<" " << month(month1, month2) <<" " << day(day1, day2);
| ^~~~
| year2
[Hydro](https://hydro.ac)提供评测服务