Const Functions

I’m not really sure why both
bool IsGameWon();
bool CheckGuessValidity(std::string);

can’t be consts - All they’re doing is checking stuff and returning an answer, there shouldn’t be any need for them to change anything.

Or is this a trick question?
Maybe I should watch the video further… :slight_smile:

EDIT (SPOILER): Hmm, now I’m confused - No reason given why CheckGuessValidity couldn’t be const.

Privacy & Terms