Say I know the incoming string s only contain one character and i have a data type char c
When I do s == c
, does c auto converts to a string type or the other way around?
Say I know the incoming string s only contain one character and i have a data type char c
When I do s == c
, does c auto converts to a string type or the other way around?
You can't do that, they are incompatible types. Something like this will work: