Borderou de evaluare (job #2490108)
Utilizator | Data | 9 noiembrie 2019 19:26:09 | |
---|---|---|---|
Problema | Ecuatii 2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:40: error: 'int index' redeclared as different kind of symbol
int q, nr, stnr, drnr, stx, drx, lung, index, semn;
^~~~~
In file included from /usr/include/c++/6/cstring:42:0,
from main.cpp:3:
/usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)'
index (const char *__s, int __c) __THROW
^~~~~
main.cpp: In function 'int main()':
main.cpp:18:17: error: overloaded function with no contextual type information
index = 0;
^
main.cpp:21:23: error: invalid types 'char [260][<unresolved overloaded function type>]' for array subscript
while (s[index] != '=') {
^
main.cpp:22:24: error: invalid types 'char [260][<unresolved overloaded function type>]' for array subscript
if (s[index] == 'x') {
^
main.cpp:29:31: error: invalid types 'char [260][<unresolved overloaded function type>]' for array subscript
} else if (s[index] == '+') {
^
main.cpp:30:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
if (s[index - 1] != 'x') {
~~~~~~^~~
main.cpp:35:31: error: invalid types 'char [260][<unresolved overloaded function type>]' for array subscript
} else if (s[index] == '-') {
^
main.cpp:36:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
if (s[index - 1] != 'x') {
~~~~~~^~~
main.cpp:42:40: error: invalid types 'char [260][<unresolved overloaded function type>]' for array subscript
nr = nr * 10 + (s[index] - '0');
^
main.cpp:44:18: error: no post-increment operator for type
index++;
^~
main.cpp:46:21: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
if (s[index - 1] != 'x'){
~~~~~~^~~
main.cpp:51:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
for (int i = index + 1; i < lung; i++) {
~~~~~~^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !