Bug 000223

When Created: 06/05/1998 23:06:35
Against DJGPP version: 2.01
By whom:
Abstract: Stream library doesn't work very well
For example, I have this following code:

    cout << "Hello";
    cout << "
The stream library doesn't work very well";
    cout << "
It's very strange";

I will only see the first two sentence. The stream doesn't output until the next
call to 'cout'. An when the next call come, it ouput the first one.

Very, very strange!

Note added: 06/10/1998 15:41:40
By whom:
This is a FAQ problem: There's no bug in the lib. It's just using
line-buffered I/O. 

Putting the '\n' at the *end* of each string, instead of
the beginning (or the more C++ -typical '<< endl' instead)
would help, here.

Note added: 06/30/1998 14:36:19
By whom:
Use '<< endl', '
' will not clear the output buffer where 'endl' will.
Also '<< flush' can be used to not go to the next line.

Closed on 04/13/1999 06:00:37: Programmer's error, not a bug.
By whom:

  webmaster     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010