Borderou de evaluare (job #2049544)
Utilizator | Data | 27 octombrie 2017 12:49:24 | |
---|---|---|---|
Problema | Barman | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:12:5: error: ‘int time’ redeclared as different kind of symbol
int time;
^
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/istream:38,
from /usr/include/c++/4.8/fstream:38,
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 ‘int main()’:
user.cpp:40:14: error: assignment of function ‘time_t time(time_t*)’
time = 0;
^
user.cpp:40:14: error: cannot convert ‘int’ to ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ in assignment
user.cpp:57:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time += abs(j - k) + 20;
^
user.cpp:57:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
user.cpp:57:30: error: assignment of function ‘time_t time(time_t*)’
user.cpp:57:30: error: cannot convert ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ in assignment
user.cpp:63:36: error: no matching function for call to ‘min(int&, time_t (&)(time_t*)throw ())’
timemin = min(timemin, time);
^
user.cpp:63:36: 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/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed:
user.cpp:63:36: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’)
timemin = min(timemin, time);
^
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/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !