Borderou de evaluare (job #1825917)

Utilizator escapeMCroCoroian Sebastian escapeMCro Data 9 decembrie 2016 20:55:45
Problema Mxl Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int calc(std::string, int, int, int&)’: user.cpp:16:9: error: declaration of ‘int s’ shadows a parameter int s=0; ^ user.cpp:18:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while(h<M[i][j].length()) ^ user.cpp:19:27: error: ‘isDigit’ was not declared in this scope {if(isDigit(M[i][j][x])) ^ user.cpp:20:27: error: ‘toNumber’ was not declared in this scope nr1=toNumber(x,i,j); ^ user.cpp:23:27: error: ‘tpnumber’ was not declared in this scope nr2=tpnumber(x,i,j); ^ user.cpp: In function ‘bool fix(std::string)’: user.cpp:44:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i<str.length(); i++) ^ user.cpp: In function ‘int toNumber(int&, int, int)’: user.cpp:69:45: error: request for member ‘length’ in ‘M[i][j].std::basic_string<_CharT, _Traits, _Alloc>::operator[]<char, std::char_traits<char>, std::allocator<char> >(((std::basic_string<char>::size_type)x))’, which is of non-class type ‘char’ while(isDigit(M[i][j][x])&&x<M[i][j][x].length()) ^ user.cpp: In function ‘int main()’: user.cpp:87:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int x=0; x<M[i][j].length(); x++) ^ user.cpp:89:27: error: no match for ‘operator==’ (operand types are ‘std::string {aka std::basic_string<char>}’ and ‘char’) if(M[i][j]=='=') ^ user.cpp:89:27: note: candidates are: In file included from /usr/include/c++/4.8/iosfwd:40:0, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/c++/4.8/bits/postypes.h:216:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&) operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) ^ /usr/include/c++/4.8/bits/postypes.h:216:5: note: template argument deduction/substitution failed: user.cpp:89:29: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::fpos<_StateT>’ if(M[i][j]=='=') ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1:

Ceva nu functioneaza?