Lindley,
I was just thinking that maybe it is a correct behavior, since ostream is not necessary a ofstream. It can be char*. And writing something behind EOF, might be undefined.

And yes, they are parent-child. But the behavior I see here contradict what you said.

So I guess I have only one choice - work with ofstream all the way through... ;-)

Thank you.