Borderou de evaluare (job #2863306)
Utilizator | Data | 6 martie 2022 16:08:56 | |
---|---|---|---|
Problema | Dir | Status | done |
Runda | Arhiva de probleme | 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 = 0;
| ^~~~~
In file included from /usr/include/string.h:432,
from /usr/include/c++/10/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/10/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 evalueaza(std::string)':
main.cpp:20:20: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>')
20 | while (expresie[index] == ',')
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from main.cpp:1:
/usr/include/c++/10/bits/basic_string.h:1017:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference = const char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
1017 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:1017:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
1017 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~~~
/usr/include/c++/10/bits/basic_string.h:1034:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
1034 | operator[](size_type __pos)
| ^~~~~~~~
/usr/include/c++/10/bits/basic_string.h:1034:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
1034 | operator[](size_type __pos)
| ~~~~~~~~~~^~~~~
main.cpp:22:14: error: no post-increment operator for type
22 | index++; // index trece de ','
| ^~
main.cpp: In function 'void evalueaza_folder(std::string)':
main.cpp:28:25: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>')
28 | if (isupper(expresie[index])) // am intalnit un folder
| ^
In file included from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !