What does while(cin) mean? What about while(cin.good())?
Is there a difference between c=cin.get() and cin.get(c)?
Printable View
What does while(cin) mean? What about while(cin.good())?
Is there a difference between c=cin.get() and cin.get(c)?
I've personally never used something like while (cin)
I guess it just checks whether the object cin exists.
about good() :
http://www.cplusplus.com/reference/i.../ios/good.html
about get() :
http://www.cplusplus.com/reference/i...tream/get.html
No, it is (roughly) the same as cin.good().Quote:
I guess it just checks whether the object cin exists.