methods of cin

Jan 2, 2013 at 9:27am
What are the different ways to get user input?

I have seen getline(cin, var_name) which gets input and sets it as a string. cin >> var_name which goes up to the fist whitespace and stops and sets whatever type was declared for as var_name. What are the other ways to get user input?

Also what is cin.get() used for, just windows not closing under Windows? Also what is cin.ignore()?

I would normally google search, but i am not sure what to exactly search for. When i do search i seem to find more a specific forum answer for one, but cannot find a list so to speak thats says this is for this, that is for that.

I have already come across:
http://www.cplusplus.com/reference/iostream/cin/
but as a beginner it sounds like gibberish. Im not even sure how to navigate through the reference as i dont know what im looking for.
Last edited on Jan 2, 2013 at 9:33am
Jan 2, 2013 at 9:43am
Topic archived. No new replies allowed.