Chapter 2
Writing with Output Streams
In This Chapter
Using the insertion operator
Working with manipulators
Formatting your output
Using flags to format your output
Specifying a precision for writing numbers
Setting field widths
Ensuring data safety with locked streams
Years ago, one of us had an old computer that had 3,000 bytes of memory. (Yes, that’s three thousand bytes, not 3MB.) As an option, this computer came with a floppy disk drive that sat outside it. It did not have a hard drive. Therefore, if you didn’t have a hard drive but you wanted to use an application, you had to load the application from a floppy, type its name, and press Enter! Ah, those were the days.
Nowadays, the notion of a computer without a hard drive seems almost unthinkable. Not only do your applications ...
Get C++ All-in-One For Dummies, 3rd 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.