Problem nylunchtime
User gOrDoN
Submission Time 2026-03-02 17:01:20
Score 0

Compile Error

nylunchtime.cpp:5:5: error: ‘long long int time’ redeclared as different kind of entity
5 | 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 nylunchtime.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;
| ^~~~
nylunchtime.cpp: In function ‘int main()’:
nylunchtime.cpp:10:6: error: no match for ‘operator>>’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘time_t(time_t*) noexcept’ {aka ‘long int(long int*) noexcept’})
10 | cin >> time;
| ~~~ ^~ ~~~~
| | |
| | time_t(time_t*) noexcept {aka long int(long int*) noexcept}
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/9/sstream:38,