foo.cc:12:19: error: 'long long int time' redeclared as different kind of entity
12 | long long int ans,time=0;
| ^~~~
In file included from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/lib/gcc/x86_64-unknown-linux-gnu/12.3.0/include-fixed/pthread.h:32,
from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/include/c++/12.3.0/x86_64-unknown-linux-gnu/bits/gthr-default.h:35,
from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/include/c++/12.3.0/x86_64-unknown-linux-gnu/bits/gthr.h:148,
from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/include/c++/12.3.0/ext/atomicity.h:35,
from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/include/c++/12.3.0/bits/ios_base.h:39,
from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/include/c++/12.3.0/ios:42,
from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/include/c++/12.3.0/ostream:38,
from iostream:39:
/nix/store/mrgib0s2ayr81xv1q84xsjg8ijybalq3-glibc-2.38-27-dev/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
76 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
foo.cc: In function 'void BFS()':
foo.cc:64:25: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*)'} [-Wpointer-arith]
64 | time++;
| ^~~~
foo.cc:64:25: error: lvalue required as increment operand
foo.cc:70:29: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*)'} to 'long long int' [-fpermissive]
70 | ans=time;
| ^~~~
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*)}
foo.cc: In function 'int main()':
foo.cc:114:21: error: assignment of function 'time_t time(time_t*)'
114 | time=0;
| ~~~~^~
[Hydro](https://hydro.ac)提供评测服务