stations.cpp:9:5: error: 'int time' redeclared as different kind of entity
9 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h:148,
from /usr/include/c++/11/ext/atomicity.h:35,
from /usr/include/c++/11/bits/ios_base.h:39,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/c++/11/bits/ranges_algobase.h:36,
from /usr/include/c++/11/bits/ranges_algo.h:35,
from /usr/include/c++/11/algorithm:64,
from stations.cpp:2:
/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)':
stations.cpp:12:17: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
12 | intime[v] = time++;
| ^~~~
stations.cpp:12:17: error: lvalue required as increment operand
stations.cpp:18:18: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
18 | outtime[v] = time++;
| ^~~~
stations.cpp:18:18: error: lvalue required as increment operand
stations.cpp: In function 'std::vector<int> label(int, int, std::vector<int>, std::vector<int>)':
stations.cpp:30:14: error: assignment of function 'time_t time(time_t*)'
30 | time = 0;
| ~~~~~^~~