Borderou de evaluare (job #1949478)

Utilizator arhivamanArhiva Man arhivaman Data 2 aprilie 2017 09:12:32
Problema Albinuta Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:17:14: error: ‘int time [51]’ redeclared as different kind of symbol int time[qMax]; ^ In file included from /usr/include/pthread.h:26:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr-default.h:35, from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr.h:148, from /usr/include/c++/4.8/ext/atomicity.h:33, from /usr/include/c++/4.8/bits/ios_base.h:39, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/time.h:186:15: error: previous declaration of ‘time_t time(time_t*)’ extern time_t time (time_t *__timer) __THROW; ^ user.cpp: In function ‘int main()’: user.cpp:76:20: warning: pointer to a function used in arithmetic [-Wpointer-arith] fin>>time[i]; ^ user.cpp:76:20: error: cannot bind ‘std::basic_istream<char>’ lvalue to ‘std::basic_istream<char>&&’ In file included from /usr/include/c++/4.8/fstream:38:0, from user.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = long int(long int*)throw ()]’ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ user.cpp:78:18: warning: pointer to a function used in arithmetic [-Wpointer-arith] if(time[i]<=beg) ^ user.cpp:78:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(time[i]<=beg) ^ user.cpp:82:19: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[i]-=beg; ^ user.cpp:82:20: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[i]-=beg; ^ user.cpp:82:20: error: assignment of read-only location ‘*(time + ((sizetype)i))’ user.cpp:82:20: 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:83:19: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[i]%=cycleLen; ^ user.cpp:83:20: error: invalid operands of types ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ and ‘int’ to binary ‘operator%’ time[i]%=cycleLen; ^ user.cpp:83:20: error: in evaluation of ‘operator%=(time_t(time_t*)throw () {aka long int(long int*)throw ()}, int)’ user.cpp:87:31: warning: pointer to a function used in arithmetic [-Wpointer-arith] for(int j=1; j<=time[i]; j++) ^ user.cpp:87:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]

Ceva nu functioneaza?