My code works but surprisingly!

int main()
{
PrintIntro();

//GetGuess();

cout << "Enter your guess  \n";

cout << "Your guess is '" << GetGuess()  << "' ?\n";
//std::cout << std::endl<< GetGuess();

return 0;

}
After "Enter your guess " the program will execute GetGuess() and then execute the whole line cout << “Your guess is '” . I thought it would execute cout << “Your guess is '” next and then GetGuess().

Privacy & Terms