Problem candles
User asruby
Submission Time 2023-12-01 16:25:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

candles.cpp:6:5: error: ‘long long int time’ redeclared as different kind of entity
6 | int 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 candles.cpp:1:
/usr/include/time.h:75:15: note: previous declaration ‘time_t time(time_t*)’
75 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
candles.cpp: In function ‘int main()’:
candles.cpp:14:12: error: request for member ‘insert’ in ‘candles’, which is of non-class type ‘long long int [N]’
14 | candles.insert(insertion);
| ^~~~~~
candles.cpp:19:14: error: request for member ‘count’ in ‘candles’, which is of non-class type ‘long long int [N]’
19 | if (candles.count(0) != 0)
| ^~~~~
candles.cpp:20:9: error: expected ‘;’ before ‘time’
20 | N -= 1
| ^
| ;