A string literal is delimited by quotation marks and is of type char* not char.
Example: "hello"
So when you compare a char to a char* you will get that same compiling error.
char c = 'c';
char *p = "hello";
if(c==p)//compiling error
{
}
To fix use a char literal which is delimited by single quotes.
Example: 'c'