Oct 1, 2012 at 3:53pm UTC
Any program I attempt to run without debugging, will run, the window pops up, and then closes itself immediately. Can anyone tell me why this happens? Or at least how I can remedy this problem?
Mind you I am using microsoft visual studio 2010
Oct 1, 2012 at 4:43pm UTC
Well it would help if you posted the source code (Use code tags!) but i think that its because it has nothing to pause it so it just runs then immediately closes
Oct 1, 2012 at 4:56pm UTC
let's say i am trying to run a simple program such as this,
printf("%d ", i);
the output of course would be,
Am i forgetting to put something in the code?
Oct 1, 2012 at 5:27pm UTC
Programs that use
, ... are meant to be run from a terminal. When you run them from outside of one, a terminal is created for the program and discarded when it's finished.
A Solution: write a batch/shell file that looks something like this:
@my_program.exe arg1 arg2 ...
Then run that instead.
Last edited on
Oct 1, 2012 at 5:28pm UTC