Problem card
User noob41
Submission Time 2023-11-08 14:16:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

card.cpp: In function ‘int32_t main()’:
card.cpp:13:21: error: invalid use of member function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’ (did you forget the ‘()’ ?)
13 | for(int i=0;i<k.length;i++){
| ~~^~~~~~
| ()
card.cpp:14:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
14 | if(k[i]=="A"){
| ^~~
card.cpp:18:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
18 | else if(k[i]=="B"){
| ^~~
card.cpp:23:15: error: no match for ‘operator-’ (operand types are ‘std::string’