However, the disadvantage of this approach is that construction and destruction of a stream object
involve more overhead than just setting and restoring some format flags. Also, note that the destruction
of a stream object does not flush the buffer. To make sure that an output buffer is flushed, it has
to be flushed manually.