The first line of this example constructs an output iterator of type ostreambuf_iterator from the
object cout. Instead of passing the output stream, you could also pass a pointer to the stream buffer
directly. The remainder constructs a string object and copies the characters in this object to the
constructed output iterator.