Borderou de evaluare (job #657409)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Numărare (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 10 aug. 2022 13:15:05 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:15:11: warning: character constant too long for its type
15 | n='mesaj[i]';
| ^~~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:13:25: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]' (did you forget the '()' ?)
13 | for(int i=0;i<mesaj.size;i++)
| ~~~~~~^~~~
| ()
main.cpp:15:11: warning: overflow in conversion from 'int' to 'char' changes value from '1784375645' to '']'' [-Woverflow]
15 | n='mesaj[i]';
| ^~~~~~~~~~
main.cpp:16:12: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'
16 | if(n>140 && (ok=0 || ok=1)
| ^
main.cpp:16:27: error: lvalue required as left operand of assignment
16 | if(n>140 && (ok=0 || ok=1)
| ~~^~~~~
main.cpp:18:9: error: expected primary-expression before 'else'
18 | else if(n<140 && (ok=0 || ok=2))
| ^~~~
main.cpp:17:18: error: expected ')' before 'else'
17 | ok=1;
| ^
| )
18 | else if(n<140 && (ok=0 || ok=2))
| ~~~~
main.cpp:16:11: note: to match this '('
16 | if(n>140 && (ok=0 || ok=1)
| ^
main.cpp:20:23: error: lvalue required as left operand of assignment
20 | else if(n<140 && ok=2)
| ~~~~~~^~~~~