Almost done with the code for my hangman assignment, I just need a bit of help (or at least a huge clue) on how to count a lowercase input as correct. Let's say the phrase to guess is "Please Kill Me Now", if the player inputs a lowercase for 'P', 'K', 'M', and 'N', it is invalid. Otherwise, if you input Uppercase for the following letters, it's correct.
Remember that C++ is case sensitive, 'C' != 'c'. For this program you may want to consider always comparing against either upper or lower case letters. Look up the documentation for either the toupper() or tolower() functions.
Yeah, I just looked into that, in which it seemed like I had hope, but after that it's now having a problem for guessing one's with the lowercase characters. For example, if the phrase is "Food"; 'f' would now be valid, but I have to enter 'o' and 'd' a couple of times until it's correct.
Hi! Thanks so much helping me edit the code, it worked really well, but how can I output it as capital letters? When I entered 'p' for 'P' with the modified code, it only outputs it to to lowercase letter.
Let's say the phrase is "Laptop", 'l' is now a valid input, but it'll output the phrase as all lowercase instead of having the uppercase for 'L'.