Borderou de evaluare (job #2347854)
Utilizator | Data | 19 februarie 2019 10:19:39 | |
---|---|---|---|
Problema | Showroom | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:59:5: error: 'int rand' redeclared as different kind of symbol
int rand = 0;
^~~~
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:5420,
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/istream:38,
from /usr/include/c++/6/fstream:38,
from main.cpp:1:
/usr/include/stdlib.h:374:12: note: previous declaration 'int rand()'
extern int rand (void) __THROW;
^~~~
main.cpp: In function 'void join(int, int)':
main.cpp:64:12: error: invalid operands of types 'int() throw ()' and 'int' to binary 'operator%'
if (rand % 2 == 0)
~~~~~^~~
main.cpp:68:7: warning: ISO C++ forbids incrementing a pointer of type 'int (*)() throw ()' [-Wpointer-arith]
rand++;
^~
main.cpp:68:7: error: lvalue required as increment operand
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !