When I did the challenge I used
cout << "Your guess: " << GetGuess() << endl;
But in the solutions i noticed that he declared a variable and set it equal to the return value of the function. Is what I did (code above) bad practice? if so, could someone explain why?