Check out PAM.
What would also be interesting is that if you open a file as binary, you don't (or at least, I would expect you didn't) get flushing on newline. Do you get fliushing on endl even though the file is binary? I know using endl on a binary file is a bit strange, but it would be interesting to find out. Unless of course endl on a binary file causes a run time error?
[QUOTE=fatjuicymole;146411]Check out PAM.
what the "PAM" reffers to?
If anyone is still interested, here is a possible workaround for the buffer problem:
https://sites.google.com/site/marcst...output-channel
The OS might flush the stream with new line or might not, we can't know for sure, it might look that in 1000 cases flushes the stream and in one case, when we assume it does... the OS make us a surprise... (i saw some people surprised by this issue)
I was talking from the C/C++ programmer point of view, for us there is no guarantee that the OS will flush on new line (\n), but in case the programmer isn't "happy" with the OS flushes, he can do it when he want it.
Bookmarks