다음을 통해 공유


ios_base::iostate

The type of constants that describe the state of a stream.

namespace std {
   class ios_base {
   public:
      typedef implementation-defined-bitmask-type iostate;
      static const iostate badbit;
      static const iostate eofbit;
      static const iostate failbit;
      static const iostate goodbit;
      ...
   };
}

설명

The type is a bitmask type that describes an object that can store stream state information. The distinct flag values (elements) are:

  • badbit, to record a loss of integrity of the stream buffer.

  • eofbit, to record end-of-file while extracting from a stream.

  • failbit, to record a failure to extract a valid field from a stream.

In addition, a useful value is goodbit, where none of the previously mentioned bits are set (goodbit is guaranteed to be zero).

요구 사항

Header: <ios>

네임스페이스: std

참고 항목

참조

ios_base 클래스

iostream 프로그래밍

iostreams 규칙