Borderou de evaluare (job #775173)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Invcuv (clasa a 7-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 18 apr. 2024 09:58:27 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:9:28: error: 'char index' redeclared as different kind of entity
9 | char st[nmax+5], cuv[105], index, indc;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/cstring:42,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:121,
from main.cpp:1:
/usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
61 | index (const char *__s, int __c) __THROW
| ^~~~~
main.cpp: In function 'void invers()':
main.cpp:26:15: error: invalid types 'char [2000005][<unresolved overloaded function type>]' for array subscript
26 | if (st[index])
| ^
main.cpp:28:23: error: invalid types 'char [2000005][<unresolved overloaded function type>]' for array subscript
28 | if (st[index]==' '){
| ^
main.cpp:29:30: error: no post-increment operator for type
29 | index++;
| ^~
main.cpp:35:29: warning: array subscript has type 'char' [-Wchar-subscripts]
35 | cuv[indc]=st[index];
| ^~~~
main.cpp:35:37: error: invalid types 'char [2000005][<unresolved overloaded function type>]' for array subscript
35 | cuv[indc]=st[index];
| ^
main.cpp:37:30: error: no post-increment operator for type
37 | index++;
| ^~