Borderou de evaluare (job #2189475)

Utilizator theo2003Theodor Negrescu theo2003 Data 28 martie 2018 13:38:52
Problema Aprindere Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:11:11: error: ‘int time’ redeclared as different kind of symbol int size, time, switchnr; ^~~~ In file included from /usr/include/pthread.h:24:0, from /usr/include/x86_64-linux-gnu/c++/6/32/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/6/32/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/istream:38, from /usr/include/c++/6/fstream:38, from user.cpp:1: /usr/include/time.h:192:15: note: previous declaration ‘time_t time(time_t*)’ extern time_t time (time_t *__timer) __THROW; ^~~~ user.cpp: In function ‘int main()’: user.cpp:31:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int y = 0;y<switches[x].first.size();y++){ ~^~~~~~~~~~~~~~~~~~~~~~~~~ user.cpp:34:31: warning: pointer to a function used in arithmetic [-Wpointer-arith] time+=switches[x].second; ^~~~~~ user.cpp:34:31: error: assignment of function ‘time_t time(time_t*)’ user.cpp:34:31: 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 user.cpp:37:10: warning: the address of ‘time_t time(time_t*)’ will always evaluate as ‘true’ [-Waddress] out<<time; ^~~~

Ceva nu functioneaza?