Thread: console output
View Single Post
Old Sep 23rd, 2005, 8:35 AM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You can set up your stream to be unbuffered. A quick way to see the influence on what you're trying is to use cerr instead of cout. It is unbuffered by default. With no buffering you don't have to call flush (or use endl).
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote