Lecture 44, lowercase check

bool FBullCowGame::IsLowerCase(FString Word) const
{
// loop through word
for (auto Letter : Word) {
if (!islower(Letter)) { // if letter is not lower case
return false; }
}
return true; // assumed if reaching this point all letters have been checked for validity
}

testing with \0 as an entry as well as a space returns the note of “please enter your word in all lower case”

try using the code BBCode block, it preserves the formatting and highlights the syntax when posting

Thanks, i’ll remember that for next time. I actually straight typed it in instead of cut and paste due to watching the videos on a different machine from the one i’m coding on, and doing the same with discussion board interactions. The coding laptop isn’t able to be connected to the internet while i’m working on these.

Privacy & Terms