foo.cc:3:16: error: expected unqualified-id before ',' token
3 | int year,year1,,year2;
| ^
foo.cc:5:10: error: expected unqualified-id before ',' token
5 | int day1,,day2,time;
| ^
foo.cc:5:16: error: 'int time' redeclared as different kind of entity
5 | int day1,,day2,time;
| ^~~~
In file included from /usr/include/c++/9/ctime:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:49,
from foo.cc:1:
/usr/include/time.h:75:15: note: previous declaration 'time_t time(time_t*)'
75 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
foo.cc:8:1: error: expected declaration before '}' token
8 | }
| ^
foo.cc:10:1: error: expected ',' or ';' before '{' token
10 | {
| ^
foo.cc: In function 'bool flag()':
foo.cc:21:6: error: 'day' was not declared in this scope; did you mean 'day2'?
21 | if(day!=day2)
| ^~~
| day2
foo.cc:25:1: error: a function-definition is not allowed here before '{' token
25 | {
| ^
foo.cc:56:1: error: expected '}' at end of input
56 | }
| ^
foo.cc:14:1: note: to match this '{'
14 | {
| ^
[Hydro](https://hydro.ac)提供评测服务