What does while(cin) mean? What about while(cin.good())?
Is there a difference between c=cin.get() and cin.get(c)?
This is a discussion on Some questions within the C++ Programming forums, part of the General Programming Boards category; 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.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way