How does std::cin return a bool value?
For instance you can writeto check the fail state of std::cin. But how does that work, if std::cin is an object of istream?Code:if(std::cin) { ... }
Also how do std::cout << "blah" << "blah"; and std::cin >> var >> var2; return bool values? The insertion operator must return ostream object so that cascading works right..
Can I do something similar with my user-defined class?