I am currently learning C++ and I am curious if there is a fix to the warning I am getting.
I am using Int32 to define my integers. I receive the following error when trying to set a variable the length of a string utilising the .length() function.
The line of code in question is as follows:
int32 HiddenWordLength = MyHiddenWord.length();
Many thanks!
int32_ttype is a signed quantity. You may have loss of precision because a signed type usually reserves at least 1 bit for the sign. Think about it, can the length of a word be negative? So, why are you using a signed value for a length?