if (!cin) and other input mismatch questions.

I know that if cin gets an incorrect type of input (like giving a character for cin >> intVariable;) then it sets some error flags and cin itself returns false. If you have:
1
2
cin >> temp;
if (!cin)


Then the if body will execute if you give the wrong type of input for the previous line, because it sets some flags.
Does the if statement just check the error flags without touching the input?
Also, if you enter the wrong type of input on the first line, then is temp left unchanged and the input not read?
Do further calls to cin return false until cin.clear() is used?
Are the fail(), bad(), and good() methods only used for testing file input?
Does the if statement just check the error flags without touching the input?
Yes
Also, if you enter the wrong type of input on the first line, then is temp left unchanged and the input not read?
Yes
Do further calls to cin return false until cin.clear() is used?
Yes
Are the fail(), bad(), and good() methods only used for testing file input?
What do you mean?

You can get many info from here: http://www.cplusplus.com/reference/iostream/istream/
Thank you for your help.
Also, never mind about the last question. As I was typing out what I meant for the question, and some example code to go with it, I stumbled upon the answer.
Topic archived. No new replies allowed.