Borderou de evaluare (job #2695003)

Utilizator redstonegamer22Andrei Ion redstonegamer22 Data 11 ianuarie 2021 14:41:44
Problema Expresie3 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:13:5: error: 'int index' redeclared as different kind of symbol int index = 0; ^~~~~ In file included from /usr/include/c++/6/cstring:42:0, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:48, from main.cpp:1: /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 'void solve(int)': main.cpp:17:14: error: invalid operands of types '<unresolved overloaded function type>' and 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}' to binary 'operator==' if(index == rd.size()) return; ~~~~~~^~~~~~~~~~~~ main.cpp:19:10: error: no match for 'operator[]' (operand types are 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' and '<unresolved overloaded function type>') if(rd[index] == '(') ^ In file included from /usr/include/c++/6/string:52:0, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/bits/ios_base.h:41, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/sstream:38, from /usr/include/c++/6/complex:45, from /usr/include/c++/6/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52, from main.cpp:1: /usr/include/c++/6/bits/basic_string.h:920: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] operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT ^~~~~~~~ /usr/include/c++/6/bits/basic_string.h:920:7: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}' /usr/include/c++/6/bits/basic_string.h:937: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] operator[](size_type __pos) ^~~~~~~~ /usr/include/c++/6/bits/basic_string.h:937:7: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}' main.cpp:21:14: error: no post-increment operator for type index++; ^~ main.cpp:23:17: error: no match for 'operator[]' (operand types are 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' and '<unresolved overloaded function type>') while(rd[index] != ')') ^ In file included from /usr/include/c++/6/string:52:0, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/bits/ios_base.h:41, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/sstream:38, from /usr/include/c++/6/complex:45, from /usr/include/c++/6/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52, from main.cpp:1: Non zero exit status: 1

Ceva nu functioneaza?