ios::operator !
bool operator ! ( ) const; | ios |
cplusplus.com |
Evaluate stream object.
Returns false if
any of the error flags failbit or badbit is set.
Otherwise returns true.
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; |