Ok Lecture 20 on Booleans and comparisons…
I am at the challenge and not seeing it. Can’t figure it out. I will of course advance to see the solution. But raises the question.
What do do at these moments?
Here is what I wrote:
bool AskToPlayAgain()
{
cout << "Do you want to play again? ";
string Response = "";
getline(cin, Response);
cout << "Is it y? " << (Response[0] == 'y' || 'Y');
cout << "Is it n? " << (Response[1] == 'n' || 'N');
cout << endl;
return false;
}
This does not do anything significant…I am not sure what else we need to do. The lecture does not give enough information to follow logically I believe, or by example like in previous lectures. Should I be digging in Books and sites to understand how to use Bool at this point?
It seems to me that something is missing… shouldn’t an “if” and an “else” be somewhere here? if yes then do this else do that?
Thanks,