foo.cc: In function 'int MonthDay(int, int)':
foo.cc:10:2: error: expected ',' or ';' before 'int'
10 | int day=31;
| ^~~
foo.cc:12:4: error: 'day' was not declared in this scope
12 | day=30;
| ^~~
foo.cc:15:4: error: 'day' was not declared in this scope
15 | day=28=leap
| ^~~
foo.cc:15:11: error: lvalue required as left operand of assignment
15 | day=28=leap
| ^~~~
foo.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
17 | }
| ^
foo.cc: At global scope:
foo.cc:18:36: error: redefinition of 'int year'
18 | int PassDay(int year,int month,int year)
| ~~~~^~~~
foo.cc:18:17: note: 'int year' previously declared here
18 | int PassDay(int year,int month,int year)
| ~~~~^~~~
foo.cc: In function 'int PassDay(int, int)':
foo.cc:20:10: error: 'day' was not declared in this scope
20 | int sum=day;
| ^~~
foo.cc: In function 'int main()':
foo.cc:29:21: error: too many arguments to function 'int PassDay(int, int)'
29 | cout<<PassDay(y,m,d)<<endl;
| ^
foo.cc:18:5: note: declared here
18 | int PassDay(int year,int month,int year)
| ^~~~~~~
[Hydro](https://hydro.ac)提供评测服务