/in/foo.cc:16:13: error: 'int time [505]' redeclared as different kind of symbol
int time[505];
^
In file included from /usr/include/pthread.h:24:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr.h:148,
from /usr/include/c++/6/ext/atomicity.h:35,
from /usr/include/c++/6/bits/ios_base.h:39,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:3:
/usr/include/time.h:192:15: note: previous declaration 'time_t time(time_t*)'
extern time_t time (time_t *__timer) __THROW;
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:35:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (time[t[i].d] == 0)
^
/in/foo.cc:37:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[t[i].d] = 1;
^
/in/foo.cc:37:19: error: assignment of read-only location '*(time + ((sizetype)t[i].Task::d))'
time[t[i].d] = 1;
^
/in/foo.cc:37:19: error: cannot convert 'int' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment
/in/foo.cc:44:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (time[j] == 0) {
^
/in/foo.cc:46:12: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[j] = 1;
^
/in/foo.cc:46:16: error: assignment of read-only location '*(time + ((sizetype)j))'
time[j] = 1;
^
/in/foo.cc:46:16: error: cannot convert 'int' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment
/in/foo.cc:25:6: warning: unused variable 'max_num' [-Wunused-variable]
int max_num = 0;
^~~~~~~
/in/foo.cc:26:6: warning: unused variable 'x' [-Wunused-variable]
int x;
^