Hi,

Thanks for your help. However, I have tried using ios::ate instead of ios::app, and the output I got was "4, 7, 6, 6, 6, 6". So it seems that when I seekp, it is seeking relative to the out2 stream, rather than the out1 stream. If it had seeked to the beginning of the out2 stream, the output would be "1, 7, 3, 4, 5, 6".

It seems that you can only seek as far back as the start of LAST output stream - but I want to seek back to the start of the FIRST output. What's going on here?

Thanks!