I wrote a C++ program that runs system calls. One of these system calls executes a Program A that is run via command prompt. When this program runs, the command window opens and closes so fast that I can't read the error that Program A is spitting out. I tried addeding in pauses after the system call but that doesn't help. I tried taking screen shots but I can't catch that split second that the window is open.
Does anyone have any other suggestions? I'm out of ideas...
You can also try a system("PAUSE"); depending on what compiler your using.
__________________ Please login or register to view this content. Registration is FREE - Latest Articles: Please login or register to view this content. Registration is FREE , Please login or register to view this content. Registration is FREE
I can't do a system("Pause") because by the time it's executed, the window is already closed. The executable is run through another program, so although I can run it through a DOS prompt, for reasons that are too long to explain, I need it to work through this other program...
This works in Windows 98 (not sure about others):
load up a DOS window
click the 'Properties' button (third from the right)
on the 'Program' tab, uncheck 'Close on exit'