Lecture 3 - Slide 19 : 27
Streams in C++ have state associated that represents
The C++ Prog. Lang. (3. edition)
The C++ Prog. Lang. (4. edition)
: Page 1080
A stream can be in one of the following states - via function predicates from
The previous IO operation succeeeded
The user hits end-of-input (Ctrl-D)
Unexpected failure - such as expecting a digit, getting a non-digit
Serious problem - such as disk read error.
A stream can be used as a condition - in a boolean context
The value is
if the state of the stream is
Illustration of implicit stream conversion to a boolean value - and stream states.