Borderou de evaluare (job #2339160)

Utilizator traiandobrinDobrin Traian traiandobrin Data 8 februarie 2019 15:23:30
Problema Betasah Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:6:12: error: 'int rand [51]' redeclared as different kind of symbol int rand[51]; ^ In file included from /usr/include/c++/6/cstdlib:75:0, from /usr/include/c++/6/ext/string_conversions.h:41, from /usr/include/c++/6/bits/basic_string.h:5420, from /usr/include/c++/6/string:52, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/bits/ios_base.h:41, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/fstream:38, from main.cpp:1: /usr/include/stdlib.h:374:12: note: previous declaration 'int rand()' extern int rand (void) __THROW; ^~~~ main.cpp: In function 'int main()': main.cpp:137:11: warning: pointer to a function used in arithmetic [-Wpointer-arith] rand[x]++; ^ main.cpp:137:12: warning: ISO C++ forbids incrementing a pointer of type 'int (*)() throw ()' [-Wpointer-arith] rand[x]++; ^~ main.cpp:137:12: error: lvalue required as increment operand main.cpp:141:17: warning: pointer to a function used in arithmetic [-Wpointer-arith] if(i-rand[i]>maxx) ^ main.cpp:141:10: error: invalid operands of types 'int' and 'int() throw ()' to binary 'operator-' if(i-rand[i]>maxx) ~^~~~~~~~ main.cpp:142:19: warning: pointer to a function used in arithmetic [-Wpointer-arith] maxx=i-rand[i]; ^ main.cpp:142:12: error: invalid operands of types 'int' and 'int() throw ()' to binary 'operator-' maxx=i-rand[i]; ~^~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?