Stream manipulators

Stream manipulators are used to modify streams, so input or output.

All of you have used at least one existing manipulator:

  • endl is a stream manipulator.

Another existing one is setw(n), a parameterised stream manipulator used to set the width of the stream to n.

But you can write your own as well.