Borderou de evaluare (job #2241786)
Utilizator | Data | 17 septembrie 2018 00:10:01 | |
---|---|---|---|
Problema | Betasah | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:6:24: error: ‘int rand’ redeclared as different kind of symbol
int n,d,k,x,y,contor,i,rand,randmax=-1;
^~~~
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/ext/string_conversions.h:41,
from /usr/include/c++/6/bits/basic_string.h:5417,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from user.cpp:1:
/usr/include/stdlib.h:374:12: note: previous declaration ‘int rand()’
extern int rand (void) __THROW;
^~~~
user.cpp: In function ‘int main()’:
user.cpp:108:14: error: assignment of function ‘int rand()’
rand=0;
^
user.cpp:108:14: error: cannot convert ‘int’ to ‘int() throw ()’ in assignment
user.cpp:111:48: warning: ISO C++ forbids incrementing a pointer of type ‘int (*)() throw ()’ [-Wpointer-arith]
if(stop[i][t]==0||mark[i][t]==1)rand++;
^~
user.cpp:111:48: error: lvalue required as increment operand
user.cpp:113:33: error: no matching function for call to ‘max(int&, int (&)() throw ())’
randmax=max(randmax,rand);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from user.cpp:1:
/usr/include/c++/6/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
user.cpp:113:33: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘int() throw ()’)
randmax=max(randmax,rand);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from user.cpp:1:
/usr/include/c++/6/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
user.cpp:113:33: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘int() throw ()’)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !