Overload handling of std::endl?
What you need to do is write your own stream buffer: When the stream buffer is flushed you output you prefix characters and the content of the stream. The following works because std::endl causes the following. Add ‘\n’ to the stream. Calls flush() on the stream This calls pubsync() on the stream buffer. This calls … Read more