cin.ignore(100, '\n');
What's the 100 mean? And are you telling it to ignore newline inputs, or what does the second argument mean? I'll do a bit of research, but it's always good hearing from someone who knows it.
Clarification: After I hit the letter 'b', the Line 2 statement appears, ("Line 2, temp1=b") AND 'b' shows up on the following line at the same time. What I want to happen is for the 'b' to NOT show up on the following line. It won't show as long as I use getch() statements, but as soon as a cin>> appears, the last thing I type shows up. And yes, when I type 'b' it shows up where I have 'c' in its own line in the second section of output.
EDIT: Found stuff about cin.ignore():
std::cin.ignore() can be called three different ways:
No arguments: A single character is taken from the input buffer and discarded:
std::cin.ignore(); //discard 1 character
One argument: The number of characters specified are taken from the input buffer and discarded:
std::cin.ignore(33); //discard 33 characters
Two arguments: discard the number of characters specified, or discard characters up to and including the specified delimiter (whichever comes first):
std::cin.ignore(26, '\n'); //ignore 26 characters or to a newline, whichever comes first
off of
this page , very useful. I'll try this and see what happens...but I'm going to sleep now.