stations.cpp:5:5: error: 'int time' redeclared as different kind of entity
5 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/13/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/13/bits/gthr.h:148,
from /usr/include/c++/13/ext/atomicity.h:35,
from /usr/include/c++/13/bits/ios_base.h:39,
from /usr/include/c++/13/streambuf:43,
from /usr/include/c++/13/bits/streambuf_iterator.h:35,
from /usr/include/c++/13/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:54,
from stations.cpp:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
76 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
stations.cpp: In function 'void dfs(int, std::vector<int>&, std::vector<std::vector<int> >&, bool, std::vector<int>&)':
stations.cpp:10:21: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} [-fpermissive]
10 | lab[node] = time;
| ^~~~
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
stations.cpp:12:5: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
12 | time++;
| ^~~~
stations.cpp:12:5: error: lvalue required as increment operand
stations.cpp:22:21: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} [-fpermissive]
22 | lab[node] = time;
| ^~~~
| |
| time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
stations.cpp:24:5: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
24 | time++;
| ^~~~
stations.cpp:24:5: error: lvalue required as increment operand