Board index » cppbuilder » not showng out put ( output screen just blinks)

not showng out put ( output screen just blinks)


2004-02-13 11:00:36 AM
cppbuilder34
I am using borland C++ builder 6
If I write a C++ program just using the cout statement my
output screen just blinks at me. But if I use the cin statement
my output screen will stop and show me the output to my program.
Why if I only use the cout statement will my output screen not
stop and show me my output. But it will if there is a cin statement in the program.
how can I get my output screen to always stop and show me the output regardless..
thanks for all the help I have gotten today
Shawn
 
 

Re:not showng out put ( output screen just blinks)

What you are seeing is normal Windows behavior. When you run a console mode
program from within a GUI program Windows creates a console for it to use as
it runs. When the program is done there no longer is need for the console
so Windows closes it. Had you run the program from the command line in a
console window then there already would have been such a window available
and it would have been used for the program.
Put a breakpoint on the return statement at the end of main or put
getchar(); just before the return statement so that it will wait for you to
press Enter.
. Ed
Quote
shawn wrote in message
news:402c3dd4$ XXXX@XXXXX.COM ...

I am using borland C++ builder 6

If I write a C++ program just using the cout statement
my output screen just blinks at me. But if I use the cin
statement my output screen will stop and show me the
output to my program.

Why if I only use the cout statement will my output screen
not stop and show me my output. But it will if there is a cin
statement in the program.

how can I get my output screen to always stop and show
me the output regardless..

thanks for all the help I have gotten today