I used the windows “Extract Function command” and it did something that is weird and confusing
string GetGuessAndPrintBack()
{
// get a guess from the player
cout << "Enter your guess: ";
string Guess = "";
getline(cin, Guess);
return RepeatGuess(Guess);
}
const std::string &RepeatGuess(std::string &Guess)
{
// print the guess back
cout << "Your guess was: " << Guess << endl;
return Guess;
}
I dont know what it does but it works