imedghar
asked on
system and dos window
Hi,
i am programming with C++ under DevC++. I am using some .exe files which are compiled with cygwin. Everything works good, and the Problem is: when I call the .exe file with system("file.exe") it runs the dos window, does what he should do, and the dos window disapear. Sometimes i want to see what happens, so I need the dos window open.
I tried :
system("file.exe");
system("PAUSE");
this way it appear another dos window which stopps the other(first) window, BUT i cant read what is in the first dos window.
thanks for your help.
i am programming with C++ under DevC++. I am using some .exe files which are compiled with cygwin. Everything works good, and the Problem is: when I call the .exe file with system("file.exe") it runs the dos window, does what he should do, and the dos window disapear. Sometimes i want to see what happens, so I need the dos window open.
I tried :
system("file.exe");
system("PAUSE");
this way it appear another dos window which stopps the other(first) window, BUT i cant read what is in the first dos window.
thanks for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
well if you just need to use this for testing purposes a simple fix would be to have the system call run a batch file. The batch file would kick off your .exe and then have the pause statement. This way things should still happen in the same dos window.