C++ copy a stream object

The reason you are not allowed to copy a stream is that it doesn’t make sense to copy a stream. If you explain what it is that you are trying to do, there’s certainly a way to do it. If you want a chunk of data you can copy, use a string. But a stream is more like a connection than a string.

Leave a Comment