basic_ios::fail

유효한 필드는 스트림에서 추출에 실패 했음을 나타냅니다.

bool fail( ) const;

반환 값

true경우 rdstate & (badbit|failbit) 그렇지 아닌 false.

failbit에 대한 자세한 내용은 ios_base::iostate을 참조하십시오.

예제

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

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

Output

false

요구 사항

헤더: <ios>

네임 스페이스: std

참고 항목

참조

basic_ios Class

iostream 프로그래밍

iostreams 규칙