Borderou de evaluare (job #2862215)
Utilizator | Data | 5 martie 2022 00:23:57 | |
---|---|---|---|
Problema | Evaluarea unei expresii | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:5: error: 'int index' redeclared as different kind of entity
8 | int index;
| ^~~~~
In file included from /usr/include/string.h:432,
from /usr/include/c++/10/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 'long long int expresie()':
main.cpp:16:17: error: invalid types 'char [100002][<unresolved overloaded function type>]' for array subscript
16 | if(isdigit(s[index]))
| ^
main.cpp:19:24: error: invalid types 'char [100002][<unresolved overloaded function type>]' for array subscript
19 | while(isdigit(s[index]))
| ^
main.cpp:21:30: error: invalid types 'char [100002][<unresolved overloaded function type>]' for array subscript
21 | nr = nr * 10 + (s[index] - '0');
| ^
main.cpp:22:18: error: no post-increment operator for type
22 | index++;
| ^~
main.cpp:26:14: error: invalid types 'char [100002][<unresolved overloaded function type>]' for array subscript
26 | else if(s[index] == '(')
| ^
main.cpp:28:14: error: no post-increment operator for type
28 | index++;
| ^~
main.cpp:31:14: error: no post-increment operator for type
31 | index++;
| ^~
main.cpp: In function 'long long int produs()':
main.cpp:39:12: error: invalid types 'char [100002][<unresolved overloaded function type>]' for array subscript
39 | while(s[index] == '*' || s[index] == '/')
| ^
main.cpp:39:31: error: invalid types 'char [100002][<unresolved overloaded function type>]' for array subscript
39 | while(s[index] == '*' || s[index] == '/')
| ^
main.cpp:41:13: error: invalid types 'char [100002][<unresolved overloaded function type>]' for array subscript
41 | if(s[index] == '*')
| ^
main.cpp:43:18: error: no post-increment operator for type
43 | index++;
| ^~
main.cpp:46:18: error: invalid types 'char [100002][<unresolved overloaded function type>]' for array subscript
46 | else if(s[index] == '/')
| ^
main.cpp:48:18: error: no post-increment operator for type
48 | index++;
| ^~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !