Index: [thread] [date] [subject] [author]
  From: Jason Grosland <jcg3@cs.duke.edu>
  To  : 
  Date: Wed, 17 Feb 1999 19:12:07 -0500

Re: Outputting to a file

>   One other thing, using endl
> instead of "\n" might be something you should be doing;
> endl flushes the output buffer, causing everything currently
> in the buffer to be written to the file.  I don't know for
> sure if "\n" will do this with the << operator...  It
> might, but it also might not, and if it doesn't, that
> could be a reason why you're never seeing anything.

Correct.  '\n' does not flush an output buffer.  You could run into
similar problems if you're doing cout debugging and forget to throw in an
endl.  You can gain the same effect by calling 'out.flush();'.

-Jason

- jcg3@duke.edu         shanty.dorm.duke.edu         www.duke.edu/~jcg3 -



Index: [thread] [date] [subject] [author]