The for loop

Hi Weastley - totally new at this, so I’m coming from a naive POV. You have “PLAYER_GUESS” in all caps like he told us to do “WORD_LENGTH.” I left mine with only one Cap. Are they the same type of call-out, in your mind? I think you may be right, so maybe I should put “GUESS” in my version.

By convention constant expressions are usually written with ALL CAPS e.g.
constexpr int WORD_LENGTH = 5;

And variables (that are not constexpr) are usually written with all small letters or only the first letter in CAP., e.g.
string Guess = "";

You can break the convention and have whatever CAPs you like, but it’s better to follow the convention - better readability and maintainability.

Yep, I’m inexperienced myself.
I should have named it “PlayersGuess” or just “Guess”, like you, since it isn’t a constant expression.

Privacy & Terms