Main.cc:4:18: error: ‘int time [30000010]’ redeclared as different kind of entity
4 | int time[30000010];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h:148,
from /usr/include/c++/9/ext/atomicity.h:35,
from /usr/include/c++/9/bits/ios_base.h:39,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from Main.cc:1:
/usr/include/time.h:75:15: note: previous declaration ‘time_t time(time_t*)’
75 | extern time_t time (time_t *__timer) __THROW;
| ^~~~
Main.cc: In function ‘int main()’:
Main.cc:26:10: warning: pointer to a function used in arithmetic [-Wpointer-arith]
26 | time[q] = way;
| ^
Main.cc:26:12: error: assignment of read-only location ‘*(time + ((sizetype)q))’
26 | time[q] = way;
| ~~~~~~~~^~~~~
Main.cc:34:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
34 | temp = time[t];
| ^
Main.cc:34:16: error: invalid conversion from ‘time_t (*)(time_t*) throw ()’ {aka ‘long int (*)(long int*)’} to ‘int’ [-fpermissive]
34 | temp = time[t];
| ~~~~~~^
| |
| time_t (*)(time_t*) throw () {aka long int (*)(long int*)}