iostream hierarchy ios:: operator ! |
cplusplus.com |
Evaluate stream object.
Returns true if
any of the error flags failbit or badbit is set.
Otherwise returns false.
This behavior is equivalent to member function fail.
Parameters.
Return Value.
true if failbit or badbit is set.
false otherwise.
Example.
// evaluating ios object
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ifstream is;
is.open ("test.txt");
if (!is)
cerr << "Error opening 'test.txt'\n";
return 0;
}
Basic template member declaration ( basic_ios<charT,traits> ):
bool operator ! () const; |