basic_ios::bad
스트림 버퍼의 무결성 손실로 나타냅니다.
bool bad( ) const;
반환 값
true경우 rdstate & badbit 아닌. 그렇지 않으면 false.
badbit에 대한 자세한 내용은 ios_base::iostate을 참조하십시오.
예제
// 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
요구 사항
헤더: <ios>
네임 스페이스: std