Borderou de evaluare (job #2853192)
Utilizator | Data | 19 februarie 2022 23:40:05 | |
---|---|---|---|
Problema | Apel | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:19:5: error: 'int index' redeclared as different kind of entity
19 | 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 'int evalueaza_functie(char)':
main.cpp:29:14: error: overloaded function with no contextual type information
29 | index += 2;
| ^
main.cpp: In function 'void calc_param(char)':
main.cpp:45:10: error: no post-increment operator for type
45 | index++;
| ^~
main.cpp:46:18: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>')
46 | while (f.apel[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:48:14: error: no post-increment operator for type
48 | index++;
| ^~
main.cpp:50:14: error: no post-increment operator for type
50 | index++;
| ^~
main.cpp: In function 'int parametru()':
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !