Hey there. I just started this course, and so far I am having a blast. For the first time though, I have a different solution that seems to be working. Can I get any feedback on it? This is my solution:
bool askPlayAgain()
{
cout << "Play again?";
string feedback = "";
getline(cin, feedback);
bool playAgain = "";
playAgain = (feedback[0] == 'y' || feedback[0] == 'Y');
return playAgain;
}
So instead of return (the comparison here) I put it in a variable first, then I return it. I am used of doing it like this in Game Maker Studio.
Also I do the comparison like that, while the tutor does it like this: (feedback[0] == βyβ) || (feedback[0] == βYβ);
Is there any difference that I dont know about? Cheers!