when i execute c program i cant even see the results in Dev C/C++,cause the command promt window automatically close!i figured the scanf trick but ....!Can anyone help please
the cmd window close!
Collapse
X
-
Tags: None
-
-
another thing (maybe i'm thinking too simply) but are you running with the debugger on? if you are and you don't have any inputs then the cmd wndw will close after the last execution of code.
corrections:
I: turn debugger off
II: add a cin.ignore(5,'\ n'); followed by a getline(cin, yourVAR); right before the return in main ( or } if you are using void main(void){})
Peace
VComment
-
Originally posted by vninjacorrections:
I: turn debugger off
II: add a cin.ignore(5,'\ n'); followed by a getline(cin, yourVAR); right before the return in main ( or } if you are using void main(void){})
You get this from Visual Studio too, run in the debugger and the program just exits, but run normally and the CMD prompt waits after the program has terminated to be shut by the user.
Therefore I only use the debugger when I actually have break points set that I want to hit. Otherwise I just run the program normally.Comment
Comment