By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,605 Members | 1,491 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,605 IT Pros & Developers. It's quick & easy.

help Needed

P: 4
I am tryn 2 run my program after compiln bt it will jst pop-up and close.i dunno wt 2 do again, can anybody help me pls?
Nov 17 '06 #1
Share this Question
Share on Google+
1 Reply


Banfa
Expert Mod 5K+
P: 8,916
Is is a console program and when a console program closes Windows closes the console window if you run it in debug mode oe from Explorer.

Do 1 of 2 things

1. Edit you program to request user input just at the end of main

getchar()

2. Don't run it directly from explorer. Start a cmd prompt and then run you program in the cmd prompt. Because the cmd prompt was running before the program started it will not close when the program closes.
Nov 17 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.