Borderou de evaluare (job #2829661)
Utilizator | Data | 8 ianuarie 2022 20:31:43 | |
---|---|---|---|
Problema | Project management | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:25:22: error: 'int time [102]' redeclared as different kind of entity
25 | int time[1 + NMAX + 1];
| ^
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:14:
/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 bfsEarliest(int)':
main.cpp:44:54: warning: pointer to a function used in arithmetic [-Wpointer-arith]
44 | maxself(earliest[i], earliest[node] + time[node]);
| ^
main.cpp:9:39: note: in definition of macro 'maxself'
9 | #define maxself(a, b) a = std::max(a, b);
| ^
main.cpp:44:43: warning: pointer to a function used in arithmetic [-Wpointer-arith]
44 | maxself(earliest[i], earliest[node] + time[node]);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
main.cpp:9:39: note: in definition of macro 'maxself'
9 | #define maxself(a, b) a = std::max(a, b);
| ^
main.cpp:9:40: error: no matching function for call to 'max(int&, time_t (*)(time_t*) throw ())'
9 | #define maxself(a, b) a = std::max(a, b);
| ^
main.cpp:44:7: note: in expansion of macro 'maxself'
44 | maxself(earliest[i], earliest[node] + time[node]);
| ^~~~~~~
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:14:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
main.cpp:9:40: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'time_t (*)(time_t*) throw ()' {aka 'long int (*)(long int*)'})
9 | #define maxself(a, b) a = std::max(a, b);
| ^
main.cpp:44:7: note: in expansion of macro 'maxself'
44 | maxself(earliest[i], earliest[node] + time[node]);
| ^~~~~~~
In file included from /usr/include/c++/10/bits/char_traits.h:39,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !