Borderou de evaluare (job #614738)
| Utilizator |
|
IP | ascuns |
|---|---|---|---|
| Problemă | Inpostfix (clasa a 10-a) | Compilator | cpp-32 |
| Rundă | Concurs IQ Academy | Clasa a 10-a | Șiruri de caractere | Status | evaluat |
| Dată | 7 nov. 2021 14:03:49 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:5:5: error: 'int index' redeclared as different kind of entity
5 | int index, ansIndex;
| ^~~~~
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 /usr/lib/gcc/i686-pc-linux-gnu/10.3.0/include/g++-v10/i686-pc-linux-gnu/bits/stdc++.h:48,
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 inmultire_impartire(int, int)':
main.cpp:12:22: error: invalid types 'char [100000][<unresolved overloaded function type>]' for array subscript
12 | } else if(intrare[index] == '(') {
| ^
main.cpp:13:14: error: no post-increment operator for type
13 | index++;
| ^~
main.cpp:15:14: error: no post-increment operator for type
15 | index++;
| ^~
main.cpp:22:26: error: invalid types 'char [100000][<unresolved overloaded function type>]' for array subscript
22 | while(intrare[index] != '*' && intrare[index] != '/')
| ^
main.cpp:22:51: error: invalid types 'char [100000][<unresolved overloaded function type>]' for array subscript
22 | while(intrare[index] != '*' && intrare[index] != '/')
| ^
main.cpp:23:22: error: no post-increment operator for type
23 | index++;
| ^~
main.cpp:24:38: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
24 | adunare_scadere(l, index - 1);
| ~~~~~~^~~
main.cpp:25:35: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
25 | adunare_scadere(index + 1, r);
| ~~~~~~^~~
main.cpp:26:38: error: invalid types 'char [100000][<unresolved overloaded function type>]' for array subscript
26 | ans[ansIndex++] = intrare[index];
| ^
main.cpp: In function 'void adunare_scadere(int, int)':
main.cpp:36:22: error: invalid types 'char [100000][<unresolved overloaded function type>]' for array subscript
36 | } else if(intrare[index] == '(') {
| ^
main.cpp:37:14: error: no post-increment operator for type
37 | index++;
| ^~
main.cpp:39:14: error: no post-increment operator for type
39 | index++;
| ^~
main.cpp:46:26: error: invalid types 'char [100000][<unresolved overloaded function type>]' for array subscript
46 | while(intrare[index] != '+' && intrare[index] != '-')