hokej.cpp:14:39: error: 'int time' redeclared as different kind of symbol
int m, n, strength, endurance, id, t, time, time_passed, block, sub;
^~~~
In file included from /usr/include/pthread.h:24:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/7/bits/gthr.h:148,
from /usr/include/c++/7/ext/atomicity.h:35,
from /usr/include/c++/7/bits/ios_base.h:39,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from hokej.cpp:1:
/usr/include/time.h:192:15: note: previous declaration 'time_t time(time_t*)'
extern time_t time (time_t *__timer) __THROW;
^~~~
hokej.cpp: In function 'int main()':
hokej.cpp:23:24: error: assignment of function 'time_t time(time_t*)'
cin >> m >> n; time = m;
^
hokej.cpp:23:24: error: cannot convert 'int' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment
hokej.cpp:37:38: error: assignment of function 'time_t time(time_t*)'
time = min(endurance, m-time_passed);
^
hokej.cpp:37:38: error: cannot convert 'const int' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment
hokej.cpp:45:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time_passed += time;
~~~~~~~~~~~~^~~~~~~
hokej.cpp:45:15: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]
hokej.cpp:47:27: error: invalid operands of types 'int' and 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' to binary 'operator-'
players[t].first.second -= time;
hokej.cpp:47:30: error: in evaluation of 'operator-=(int, time_t(time_t*) throw () {aka long int(long int*) throw ()})'
players[t].first.second -= time;
^~~~