hi can some one note out what is wrong with this code:
the error come out is:Code:int ifEven(string str) { string array[15]; int i=0; int k=0; while(i<str.size()-1) { array[k]=str.substr(i,2); cout<<array[k]<<" "; i+=2; k+=1; } for(int i = 0; array[i]; i++) { cout<<array[i]; } }
function `int ifEven(std::basic_string<char, std::char_traits<char>, std::allocator<char>:
could not convert `array[i]' to `bool'