O'Reilly logo

C++ All-in-One For Dummies, 3rd Edition by John Paul Mueller, Jeff Cogswell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2

Writing with Output Streams

In This Chapter

arrow Using the insertion operator

arrow Working with manipulators

arrow Formatting your output

arrow Using flags to format your output

arrow Specifying a precision for writing numbers

arrow Setting field widths

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required