Borderou de evaluare (job #1613980)

Utilizator andrei.arnautuAndi Arnautu andrei.arnautu Data 25 februarie 2016 18:57:18
Problema Project management Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:16:15: error: ‘int time [101]’ redeclared as different kind of symbol int time[MAX_N]; ^ 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/basic_string.h:39, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/random:41, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from user.cpp:6: /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 ‘void readData()’: user.cpp:25:28: warning: pointer to a function used in arithmetic [-Wpointer-arith] scanf("%d", &time[i]); ^ user.cpp:25:29: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ [-Wformat=] scanf("%d", &time[i]); ^ user.cpp: In function ‘void computeTime(int)’: user.cpp:44:34: warning: pointer to a function used in arithmetic [-Wpointer-arith] minTime[node] = time[node]; ^ user.cpp:44:34: error: invalid conversion from ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘int’ [-fpermissive] user.cpp:54:35: warning: pointer to a function used in arithmetic [-Wpointer-arith] minTime[node] += time[node]; ^ user.cpp:54:23: warning: pointer to a function used in arithmetic [-Wpointer-arith] minTime[node] += time[node]; ^ user.cpp:54:23: error: invalid conversion from ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘int’ [-fpermissive] user.cpp: In function ‘void updateBonusTime(int)’: user.cpp:76:73: warning: pointer to a function used in arithmetic [-Wpointer-arith] bonusTime[*it] = max(bonusTime[*it], bonusTime[node] + time[node]); ^ user.cpp:76:73: warning: pointer to a function used in arithmetic [-Wpointer-arith] user.cpp:76:74: error: no matching function for call to ‘max(int&, time_t (*)(time_t*)throw ())’ bonusTime[*it] = max(bonusTime[*it], bonusTime[node] + time[node]); ^ user.cpp:76:74: note: candidates are: In file included from /usr/include/c++/4.8/vector:60:0, from user.cpp:5: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed:

Ceva nu functioneaza?