C++ Dot Operator done differently

I did my length check a bit differently.
I declared a new bool function in the header called CheckLength()
I also declared two new int32 variables, HiddenWordLength and GuessLength.

When the player enters their guess, I determine the length of HiddenWord and Input, and initialize the variables HiddenWordLength and GuessLength, respectively.

I then call the CheckLength function, which checks if the length of HiddenWordLength and GuessLength are the same. If they are, this returns true, and if not, it returns false.

Right now, the true and false are used to inform the player whether their guess at least had the correct number of characters. In the future, I want to compare two functions, CheckLength() and IsIsogram() and only deduct an attempt from the player if BOTH are false.

Currently, an attempt is deducted if the answer isn’t 100% correct.

1 Like

Privacy & Terms