Borderou de evaluare (job #2790928)

Utilizator andreic06Andrei Calota andreic06 Data 29 octombrie 2021 19:53:21
Problema Arb Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:36:5: error: 'int time' redeclared as different kind of entity 36 | int time = 0; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr.h:148, from /usr/include/c++/10/ext/atomicity.h:35, from /usr/include/c++/10/bits/ios_base.h:39, from /usr/include/c++/10/ios:42, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/time.h:75:15: note: previous declaration 'time_t time(time_t*)' 75 | extern time_t time (time_t *__timer) __THROW; | ^~~~ main.cpp: In function 'void euler_tour(int)': main.cpp:38:5: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) throw ()' {aka 'long int (*)(long int*)'} [-Wpointer-arith] 38 | time ++; | ^~~~ main.cpp:38:5: error: lvalue required as increment operand main.cpp:39:10: error: invalid types 'int [500001][time_t(time_t*) throw () {aka long int(long int*)}]' for array subscript 39 | euler[time] = root; | ^ main.cpp:43:23: error: invalid conversion from 'time_t (*)(time_t*) throw ()' {aka 'long int (*)(long int*)'} to 'int' [-fpermissive] 43 | step_in[root] = time; | ^~~~ | | | time_t (*)(time_t*) throw () {aka long int (*)(long int*)} main.cpp:44:22: error: invalid conversion from 'time_t (*)(time_t*) throw ()' {aka 'long int (*)(long int*)'} to 'int' [-fpermissive] 44 | step_out[root] = time; | ^~~~ | | | time_t (*)(time_t*) throw () {aka long int (*)(long int*)} main.cpp:49:8: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) throw ()' {aka 'long int (*)(long int*)'} [-Wpointer-arith] 49 | time ++; | ^~~~ main.cpp:49:8: error: lvalue required as increment operand main.cpp:50:13: error: invalid types 'int [500001][time_t(time_t*) throw () {aka long int(long int*)}]' for array subscript 50 | euler[time] = root; | ^ main.cpp:51:25: error: invalid conversion from 'time_t (*)(time_t*) throw ()' {aka 'long int (*)(long int*)'} to 'int' [-fpermissive] 51 | step_out[root] = time; | ^~~~ | | | time_t (*)(time_t*) throw () {aka long int (*)(long int*)} main.cpp: In function 'void debug_tree()': main.cpp:109:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 109 | for ( int i = 1; i <= time; i ++ ) | ~~^~~~~~~ main.cpp: In function 'int main()': Non zero exit status: 1

Ceva nu functioneaza?