My Const Functions

I strongly feel except Reset Function all the other Member functions should use const as they are not meant to change anything. For example IsGameWon() is going to check some variable to find out whether all the letters are matching, It is not going to change anything.
Similarly CheckGuessValidity() is also going to check a variable and not change the variable itself.

Please correct me if i am wrong!!


As we haven’t coded them yet it’s hard to say if they should be const. However I can’t possibly see how any variable in either function would need to be changed, so I agree with your line of thinking.

Privacy & Terms