There's a funny thing when you use cin to input into a character- it only inputs one character. That means that the newline character that you put in when you hit enter to insert the character is still floating in the input stream. Once the code asks for a new string, it reads the newline and terminates the input. What the code I just showed does is ignores everything in the buffer up until and including the newline, or 10000 characters. That way, it rids of that pesky newline causing your problems.