Hello .

I've literally just started trying to teach myself C++ using Microsoft Visual C++, so please go easy on me, as I know hardly anything yet :P. I know a little more about VB.

I understand that using cin>>[variablename] will put whatever the user types before pressing enter into the variable, but I was curious about the cin.get(). Apparently it gets the Console to stop and makes you press Enter before proceeding to the next line. But when I've tried it, it appears to need multiple cin.get() functions according to however many characters there are or the program will simply close. It's really odd - can anyone explain to me what it's actually doing, and if there's a better way besides system ("PAUSE") to hold the Console?

I'm also curious about cin.ignore() - apparently it throws away any characters in an input that don't belong to a certain data type. I had an experiment with this - when I typed in "56f" for an Int variable and used cout<< to print it, it printed "56" and then used up the cin.get() below and closed the program. I put in another cin.get() and it works. I type in "56fg" and this time it closes again.

Sorry if this sounds stupid, I really am a complete beginner here, so any help in explaining these functions to me - and any terms that I may have misused - would be really appreciated .