Borderou de evaluare (job #614787)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Postinfix (clasa a 10-a) | Compilator | cpp-32 |
Rundă | Concurs IQ Academy | Clasa a 10-a | Șiruri de caractere | Status | evaluat |
Dată | 7 nov. 2021 16:36:46 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:12:8: error: 'int index' redeclared as different kind of entity
12 | int i, index ;
| ^~~~~
In file included from /usr/include/string.h:446,
from /usr/lib/gcc/i686-pc-linux-gnu/10.3.0/include/g++-v10/cstring:42,
from main.cpp:2:
/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 construction()':
main.cpp:37:12: error: invalid types 'char [100005][<unresolved overloaded function type>]' for array subscript
37 | while(s[index] == ' ')
| ^
main.cpp:38:14: error: no post-increment operator for type
38 | index++;
| ^~
main.cpp:40:9: error: invalid types 'char [100005][<unresolved overloaded function type>]' for array subscript
40 | if(s[index] <= 'Z' and s[index] >= 'A')
| ^
main.cpp:40:29: error: invalid types 'char [100005][<unresolved overloaded function type>]' for array subscript
40 | if(s[index] <= 'Z' and s[index] >= 'A')
| ^
main.cpp:42:19: error: invalid types 'char [100005][<unresolved overloaded function type>]' for array subscript
42 | rez[i] = s[index] ;
| ^
main.cpp:45:14: error: no post-increment operator for type
45 | index++;
| ^~
main.cpp: In function 'int main()':
main.cpp:87:13: error: overloaded function with no contextual type information
87 | index = 0 ;
| ^
main.cpp:92:23: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'unsigned int'} [-Wsign-compare]
92 | for(int i = 0 ; i < strlen(rez) ; i++)
| ~~^~~~~~~~~~~~~
main.cpp:107:23: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'unsigned int'} [-Wsign-compare]
107 | for(int i = 0 ; i <= strlen(rez) ; i++)
| ~~^~~~~~~~~~~~~~
main.cpp: In function 'bool grad(char)':
main.cpp:27:1: warning: control reaches end of non-void function [-Wreturn-type]
27 | }
| ^
main.cpp: In function 'int main()':
main.cpp:75:10: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
75 | fgets(s, MAX_LENGTH, fin) ;
| ~~~~~^~~~~~~~~~~~~~~~~~~~