Lecture overview -- Keyboard shortcut: 'u'  Previous page: Standard streams -- Keyboard shortcut: 'p'  Next page: Manipulators -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 2 - Page 34 : 42
Notes about C++
Basic facilities
Stream State

  • The C++ Programming Language: Page 616
 

Streams in C++ have state associated that represents error conditions and formatting details

  • Error condition or non-standard condition - class basis_ios

    • strm.good()

    • strm.eof()

    • strm.fail()

    • strm.bad()

  • In boolean contexts, a stream is converted to a value of type void*

  • Formatting flags - class ios_base

    • For white space skipping, ajustment, padding, integer base, floating point formatting, etc.

    • The formatting flags can be read and written together (p. 626)

y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/io/copy-is-os.ccIllustration of implicit stream conversion to a boolean value.


At a higher level of abstraction, the formatting flags are changed by so-called manipulators - see next page