just after the cin >> quit; to eat up the rest of the line, including the '\n'.
When you mix cin with getline, you've got to make sure you don't leave '\n's sitting in the stream. Otherwise getline will just get the end of the line cin nibbled at rather than waiting for a fresh, new one.
Enter phrase in lower case to be turned into upper case:
hello
HELLO
Do you want stop entry?
n
Enter phrase in lower case to be turned into upper case:
goodbye
GOODBYE
Do you want stop entry?
n
Enter phrase in lower case to be turned into upper case:
again
AGAIN
Do you want stop entry?
q
Weird, according to http://www.cplusplus.com/reference/string/string/getline/ you will just append the characters to the end of a string with getline, although it looks like it also clears the string first from the above output.
Maybe use numeric_limits<streamsize>::max() rather than 1024 in the above code?
Hi Andy,
I modified the program again and it now works. The placement of the line of code is different than were I had it. It was after the cin >> read. I placed it at to top of the code before the getline. That may have made a difference. Thanks for the help.