| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
General - Black screen
Hi
I'm fairly new to C++, and have a question if you can help, please. I am using visual C++ express 2008 at the moment, and trying some very basic programming. One problem I'm having is that once I execute something the black screen disappears right after the program executes before I can verify whether the result is what I had expected or not. I had temporarily solved the problem by adding some extra line of codes that tells the user to enter zero in order to exit the program, or else the screen stays. I was wondering if there is any other way to keep the black screen from automatically closing. Thank you so much for your help in advance ![]() |
|
#2
|
|||
|
|||
|
You could use the... system("PAUSE"); command ...
|
|
#3
|
|||
|
|||
|
Thank you so much... it works
I was reading some article about the system("PAUSE") command and didn't know what they were talking about... any thoughts?? http:// www. gidnetwork. com/b-61. html however, I didn't find any other alternative for the command either... |
|
#4
|
|||
|
|||
|
Preferrably, set a breakpoint at the end of main(). (You didn't use exit() calls, did you?)
The system("pause") thing works on windows, except you have to press it twice if you didn't attach the debugger. That's my way of doing it, anyway.
__________________
Quote:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > General - Black screen |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|