/in/foo.cc:8:18: error: 'int time [10003]' redeclared as different kind of symbol
int len[N],time[N];
^
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:2:
/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:20:8: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[s]=kid[s];
^
/in/foo.cc:20:15: error: assignment of read-only location '*(time + ((sizetype)s))'
time[s]=kid[s];
^
/in/foo.cc:20:15: error: cannot convert 'int' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment
/in/foo.cc:24:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[pre[now]]=time[now]+kid[pre[now]],
^
/in/foo.cc:24:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[pre[now]]=time[now]+kid[pre[now]],
^
/in/foo.cc:24:40: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[pre[now]]=time[now]+kid[pre[now]],
^
/in/foo.cc:24:40: error: assignment of read-only location '*(time + ((sizetype)pre[now]))'
/in/foo.cc:24:40: error: cannot convert 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment
/in/foo.cc:30:54: warning: pointer to a function used in arithmetic [-Wpointer-arith]
printf ("%d\n%d", len[now]+len[pre[now]], time[now]+time[pre[now]]);
^
/in/foo.cc:30:69: warning: pointer to a function used in arithmetic [-Wpointer-arith]
printf ("%d\n%d", len[now]+len[pre[now]], time[now]+time[pre[now]]);
^
/in/foo.cc:30:55: error: invalid operands of types 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' and 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' to binary 'operator+'
printf ("%d\n%d", len[now]+len[pre[now]], time[now]+time[pre[now]]);
~~~~~~~~~^~~~~~~~~~~~~~~
/in/foo.cc:34:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[pre[now]]=time[now]+kid[pre[now]],
^
/in/foo.cc:34:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[pre[now]]=time[now]+kid[pre[now]],
^
/in/foo.cc:34:40: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[pre[now]]=time[now]+kid[pre[now]],
^
/in/foo.cc:34:40: error: assignment of read-only location '*(time + ((sizetype)pre[now]))'
/in/foo.cc:34:40: error: cannot convert 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment