In the previous lecture, you mention that the do while loop generates a warning about not all control paths return a value.
Instead of using
while (Status != EGuessStatus::OK);
I simply changed it to
while (true);
which doesn’t generate the warning, at least for me. Eventually, once the user does enter a valid guess, it does exit the loop and return from the method.
My question is, does this mean that ignorance is bliss? Since it’s not being tied to EGuessStatus in the while condition, the compiler doesn’t seem to even see that “not all control paths return a value.”
My second question is, would this be a valid way to write this logic considering it doesn’t generate a warning? Or should I get into the practice of solution in the video anyway?