Getting Char to Equal a Char

Hello. In my program, I need to enter a char and if it is equal to a certain letter, I need the program to do a certain thing. For example:
1
2
3
4
5
char a ;
cout << "Enter Answer (Y/N): " ;
cin >> a ;
if (a == here i need it to be y so if a  equals y, control passes to the if statement. 
I get an error message saying that y has not been declared. Please help!

Any help wold be appreciated. Thank you!
Nevermind. I found that you must say:

if (a == 'y' ) ...

Thank you anyone, though.
1
2
if (a== 'y' || a=='Y'){
}
Topic archived. No new replies allowed.