From: jkubicky AT cco DOT caltech DOT edu (Joseph J. Kubicky) Subject: Problem with cout in 1.06 To: djgpp AT sun DOT soe DOT clarkson DOT edu Date: Fri, 1 May 92 23:01:26 PDT Status: O I'm found a little problem with the cout<< stuff in 1.06. I don't have time (nor the expertise, really) to track it down myself, but someone might be interested. Basically, it involves redirecting the output of a c++ prog to a file. Here is the program: #include #include main() { for(int i=0; i < 500; ++i) // printf("ABCDEFG %d\n", i); cout<<"ABCEFG "< (program done). But if I redirect the output: go32 t1 >t1.out, the file ends with something like: ABCDEFG 478 ABCDEF(eof) If I use printf (comment out cout<<), the file looks like what we would expect. The difference in the sizes of the files produced is 6890-6110= 770. If I shorten the output to 300 lines, the difference is 753 bytes. Looks like a buffer isn't being flushed. Jay Kubicky jkubicky AT cco DOT caltech DOT edu