Console buffered output

I am debugging remotely using Momentics on a Windows2K machine. My
application writes to the std out at start up and I expect to see this in
the console view. Unfortunately, it is buffered and does not get updated. Is
there a way to disable the buffering an have it update immediately?

JV <jvoichick@nimblegen.com> wrote:

I am debugging remotely using Momentics on a Windows2K machine. My
application writes to the std out at start up and I expect to see this in
the console view. Unfortunately, it is buffered and does not get updated. Is
there a way to disable the buffering an have it update immediately?

Make a setvbuf() call at the start of your application.

setvbuf(stout, _IOLBF, NULL) or something like that – check library
reference for setvbuf().

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

setvbuf( stdout, NULL, _IONBF, 0 ); if you are doing character
output (flush on character as opposed to line)

David Gibbs wrote:

JV <> jvoichick@nimblegen.com> > wrote:
I am debugging remotely using Momentics on a Windows2K machine. My
application writes to the std out at start up and I expect to see this in
the console view. Unfortunately, it is buffered and does not get updated. Is
there a way to disable the buffering an have it update immediately?

Make a setvbuf() call at the start of your application.

setvbuf(stout, _IOLBF, NULL) or something like that – check library
reference for setvbuf().

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.