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 ...