记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
5-6 过去了多少天
比赛
2022暑期青少年社团(入门赛)
语言
C++
递交时间
2022-07-28 19:43:10
评测时间
2022-07-28 19:43:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes