how do you get the program you compile to stay up when you run it if it just flashes
C++ programming?
you should type this after %26lt;iostream%26gt;:
#include %26lt;conio.h%26gt;
and before u put ' }' in the last row of main function, type:
getch();
hope u got it! =)
Reply:at the very end of your program (if using on a windows based OS) type
system("pause");
Reply:I guess, your program is console one, right?
You can make it stay onscreen either adding
getch();
or
while( !kbhit()) { ; }
at the end of your main() -- in this case it will wait for a keypress -- or simply executing it from command line (from console).
Reply:Assuming you are new to programming and it's a program you are compiling in windows.
You have type
system("pause");
before the "return (value). Otherwise the windows program will close it.
Cheers %26amp; Bottoms Up
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment