You have two ways to solve this. The preferred method is to use:
char). The other possible method to solve it is:
if (answer == 'y') ...
note single quotes instead of double, illustrating a
A string literal is delimited by quotation marks and is of type char* not char.
Hence at the time you compare a char to a char* you will obtain that similar compiling error.
char c = 'c';
char *p = "hello";
To solve exercise a char literal which is delimited by single quotes.
You should remember to employ single quotes for char constants. So exercise
if (answer == 'y') return true;
if (answer == "y") return true;