Borderou de evaluare (job #2092771)

Utilizator FrequeAlex Iordachescu Freque Data 22 decembrie 2017 12:10:01
Problema Project management Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:17:14: error: ‘int time [105]’ redeclared as different kind of symbol int time[NMAX], early[NMAX], late[NMAX], sorted[NMAX]; ^ 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/ostream:38, from /usr/include/c++/4.8/iostream:39, 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 ‘void critical_path()’: user.cpp:55:71: warning: pointer to a function used in arithmetic [-Wpointer-arith] early[sorted[i]] = max(early[sorted[i]], early[j] + time[j]); ^ user.cpp:55:71: warning: pointer to a function used in arithmetic [-Wpointer-arith] user.cpp:55:72: error: no matching function for call to ‘max(int&, time_t (*)(time_t*)throw ())’ early[sorted[i]] = max(early[sorted[i]], early[j] + time[j]); ^ user.cpp:55:72: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /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: user.cpp:55:72: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’) early[sorted[i]] = max(early[sorted[i]], early[j] + time[j]); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: user.cpp:55:72: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’) early[sorted[i]] = max(early[sorted[i]], early[j] + time[j]); ^ user.cpp:62:76: warning: pointer to a function used in arithmetic [-Wpointer-arith] late[sorted[i]] = min(late[sorted[i]], late[j] - time[sorted[i]]);

Ceva nu functioneaza?