What does while(cin) mean? What about while(cin.good())?
Is there a difference between c=cin.get() and cin.get(c)?
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().I guess it just checks whether the object cin exists.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)