O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

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

Manipulators

As you have seen, manipulators are useful mainly for output manipulation in formatting streams during extraction. They can also be used for input manipulation, although when such input relies on interaction with the users, you might not always get the expected result, because you can’t control what the users actually type.

The first set of manipulators acts like switches that turn features on and off. In the following list, the (no) reverses the action of the manipulator. So noskipws is the opposite of skipws, meaning that the class will treat whitespace as significant if noskipws is specified.

The basic switch-based manipulators are as follows:

(no) boolalphaDisplay Booleans as text, rather than as 0 or 1
(no) showpointShow the ...

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