So, for those who don't know, you can use cin.ignore(); at the end of the program in order to create a "Press Enter to end program." But for some reason, on my latest project, I needed to use cin.ignore(); twice in order to get the desired effect. Notice the last few lines of both pictures and their differences.
When you press enter to confirm input you also insert a newline character.
Formatted input/output operations stop as soon as they find a character they can't interpret as part of a number, but that character is left in the buffer together with whatever comes after.
So after the last operation you are left with a newline in the input buffer, ready to be read or ignored.
Hm... Okay, thanks for the feedback!
@maeriden: I just thought using cin.ignore(); twice just looked strange so, if possible, I was going to try to fix that. And... I just wasn't sure why I had to do that in the first place.
@jlb: I haven't heard of cin.clear(); before so, perhaps I can use that next time. As you can tell, I am a complete beginner to C++ so, I'm still learning the various objects and thigs like that.