Exercises in this lecture  previous -- Keyboard shortcut: 'p'        Go to the slide, where this exercise belongs -- Keyboard shortcut: 'u'  

Exercise 3.4
Understand the way we program and use output stream manipulators


Study the program on the accompanying slide in which we program our own stream manipulator.

First, read through the program (do it together with fellow students) and understand what happens.

Next, use the pattern to write a couple of new stream manipulators. If possible, make some which are more useful than the one I wrote. Maybe manipulators that affect the state of the stream, instead putting characters to the stream.

I recommend that you take a look at page 1087 in The C++ Prog. Lang. (4. edition).


There is no solution to this exercise