My ProcessGuess() is not a const ref function

My ProcessGuess() changes UserGuess input by converting any upper case characters to lower case. Is this acceptable? An alternative would be to create and alter a copy of UserGuess.
Thanks.

Either that or call ToLowerInline before calling OnInput in the Terminal.cpp here

Brilliant . Thank you. Never would have visited other files otherwise. The new implementation did interrupt my flow of logic because I think validating the word length and validating the characters before converting to lower case would be more efficient. Your thoughts?

You would be right so it might be preferable to make it a non-const reference in your case.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms