Borderou de evaluare (job #2587910)

Utilizator RobertLearnsCDragomir Robert. RobertLearnsC Data 23 martie 2020 19:32:28
Problema Arh Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:9:5: error: 'int index' redeclared as different kind of symbol int index; ^~~~~ 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 'std::__cxx11::string modificaSir()': main.cpp:42: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 >= seq.size()) { ~~~~~~^~~~~~~~~~~~~ main.cpp:46:17: error: invalid operands of types '<unresolved overloaded function type>' and 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}' to binary 'operator<' while(index < seq.size() && seq[index] >= 'a' && seq[index] <= 'z') { ~~~~~~^~~~~~~~~~~~ main.cpp:46:36: error: no match for 'operator[]' (operand types are 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' and '<unresolved overloaded function type>') while(index < seq.size() && seq[index] >= 'a' && seq[index] <= 'z') { ^ 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:46:57: error: no match for 'operator[]' (operand types are 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' and '<unresolved overloaded function type>') while(index < seq.size() && seq[index] >= 'a' && seq[index] <= 'z') { ^ 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?