paulchen
asked on
disable cout buffering
How can I disable the buffering of output from cout?
Thank you!
Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've never seen this before. What platform/compiler?
BTW, I recall that cout is unitbuf by default.
BTW, I recall that cout is unitbuf by default.
Does "cerr" behave like you want it to (ie. unbuffered?) If it does not, then the problem could be with the OS, not the libraries you are using. (cerr is tied to fd 2 (stderr) instead of fd 1 (stdout) and is supposed to be unbuffered, though both are based the same parent class (as far as I know, may be implementation dependant)).
"clog" is supposed to be an unbuffered "cerr".
How do they do it? (tracking this doen might help)
"clog" is supposed to be an unbuffered "cerr".
How do they do it? (tracking this doen might help)
ASKER
thank you for your answer.
unfortunately, it didn't work. it still gets all buffered and
output after program termination.