Use the New Header Organization

The Standard specifies new names for the header files, as described in Chapter 2. If you've been using the old-style header files, you should change over to using the new-style names. This is not just a cosmetic change because the new versions might add new features. For example, the ostream header file provides support for wide-character input and output. It also provides new manipulators such as boolalpha and fixed (as described in Chapter 16). These offer a simpler interface than using setf() or the iomanip functions for setting many formatting options. If you do use setf(), use ios_base instead of ios when specifying constants; that is, use ios_base::fixed instead of ios::fixed. Also, the new header files incorporate ...

Get The Waite Group's C++ Primer Plus, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.