Ok, before reading other comments or advancing to the solution.
What I did was to include the “do” and “while” in the “main” function. Like so:
//The entry point of our application
int main()
{
do
{
PrintIntro();
PlayGame();
AskToPlayAgain();
}
while (AskToPlayAgain() == true);
return 0; // exit the application
}
There are no errors, but when I run it, I get asked if I want to play, twice… I do not understand why.
But I played around a bit I tried other approaches and while tinkering I realised my mistake in the first place, I was repeating the “AskToPlayAgain” twice, and so I remove it in the “do” and only left it in the “while” and when I run it it works as desired!.
int main()
{
do
{
PrintIntro();
PlayGame();
}
while (AskToPlayAgain() == true);
return 0; // exit the application
}
Now to watch the solution in the video, I will reply with comment.
Cheers!