Since we declare and initialize enum type EGuessWordStatus ‘Status’ inside GetValidGuess() before the do loop, why can we not then access our error codes using Status::Error_Code, rather than EGuessWordStatus::Error_Code in the switch statement?
If you’re accessing things using the “::”, you have to access it through a class or namespace.
I tried what you suggested and that’s what the error message said.
‘Status’ is a variable and used to create the expression for the switch statement. It’s not a class or namespace.
Good luck, @gshw!
Thanks for the answer, just got back to it.
1 Like