basic_ios::bad

Gibt einen Verlust der Integrität des Streampuffers an

bool bad( ) const;

Rückgabewert

true, wenn rdstate & badbit nicht 0 ist; andernfalls false.

Weitere Informationen zu badbit finden Sie unter ios_base::iostate.

Beispiel

// basic_ios_bad.cpp
// compile with: /EHsc
#include <iostream>

int main( void ) 
{
   using namespace std;
   bool b = cout.bad( );
   cout << boolalpha;
   cout << b << endl;

   b = cout.good( );
   cout << b << endl;
}

Output

false
true

Anforderungen

Header: <ios>

Namespace: std

Siehe auch

Referenz

basic_ios Class

Programmierung der iostream-Headerdatei

iostreams Konventionen