Im trying to make a simple program in console to ask what you would like to do. and you answer and the program check the answer and if it is "this" then it will say something but anything else will say something else.
this is the actual details of the problem
/////////
char Question = ''; <------idk what to assign here to correct tell it to grab.
the format might look wrong but when i run it states the question and i put flyCode:cout << "What would you like to do first?\n"; cin >> Question; if ( Question == 'sleep' ) { cout << "Goodnight then" << endl; qQ = true; <---- just a boolean to tell the computer to stop looping } else cout << "I don't know what " << Question << " is." << endl; }
ive got it on a loop until the right answer is said but when i put wrong answer i get this
it says
i dont know what f is.
i dont know what l is.
i dont know what y is.
i think im using the wrong assigment CHAR. is there something else i can use to store whatever the user puts in cin? sorry if this is confusing. hope you can help!