Okay I’m just having a bit of a weird time trying to understand how this works. We went from this:
int main ()
{
while (true)
{
PlayGame();
std::cin.clear();
std::cin.ignore();
}
return 0;
}
to this:
int main ()
{
while (true)
{
bool LevelComplete = PlayGame();
std::cin.clear();
std::cin.ignore();
}
return 0;
}
My question is, does the line “bool LevelComplete = PlayGame();” not only assign the bool return value of PlayGame() to Level Complete, but also run the PlayGame() function…? I would’ve assumed it would only assign one value to the other and not also run the PlayGame function…but apparently it does. I just want to be clear as to what’s going on here.