delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/05/02/11:08:36

Date: Sat, 2 May 92 10:11:16 EDT
From: DJ Delorie <dj AT ctron DOT com>
To: jkubicky AT cco DOT caltech DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Problem with cout in 1.06
Status: O

You should be using the flush codes for cout.  Simply writing a newlind character
in a string constant will not always flush the stream.  AT&T specs a flush
operator for streams:

	cout << flush;

I'm pretty sure gcc's iostreams has this also.  You should also use
the end of line operator for newlines:

	cout << "hello" << endl;

Of course, the fact that it doesn't flush on exit may be a bug as
well, or just a real pain.

DJ
dj AT ctron DOT com
Life is a banana.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019