State of the Stream
Are there tools we can use in C++ which allow us to check the current condition of the stream? Flags answer this question.
We'll cover the following...
We'll cover the following...
Flags represent the state of the stream stream
. The methods for dealing with these flags need the header <iostream>
. Flags representing the state of a stream are:
Flag | Query of the flag | Description |
---|---|---|
std::ios::goodbit |
stream.good() |
No bit set |
std::ios::eofbit |