Borderou de evaluare (job #1488298)
Utilizator | Data | 18 septembrie 2015 16:37:41 | |
---|---|---|---|
Problema | Defrag | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:8:27: error: ‘int free’ redeclared as different kind of symbol
int w[102][365], S, P, K, free;
^
In file included from /usr/include/c++/4.8/cstdlib:72:0,
from /usr/include/c++/4.8/ext/string_conversions.h:41,
from /usr/include/c++/4.8/bits/basic_string.h:2815,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
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/stdlib.h:488:13: error: previous declaration of ‘void free(void*)’
extern void free (void *__ptr) __THROW;
^
user.cpp: In function ‘int main()’:
user.cpp:26:58: error: ISO C++ forbids incrementing a pointer of type ‘void (*)(void*)throw ()’ [-fpermissive]
for(int i = 1; i <= P; ++i) if(w[p][0] == 0) free++;
^
user.cpp:26:58: error: lvalue required as increment operand
user.cpp:27:15: warning: the address of ‘void free(void*)’ will always evaluate as ‘true’ [-Waddress]
fout<<free;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !