?
Solved

system and dos window

Posted on 2005-05-16
2
Medium Priority
?
262 Views
Last Modified: 2013-11-15
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.


0
Comment
Question by:imedghar
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 1000 total points
ID: 14010416
try with system("cmd /k file.exe");
0
 
LVL 3

Expert Comment

by:gkatz
ID: 14010420
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.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
Web hosting control panels were first developed to make it faster and easier for most users to set up and operate websites. The graphical user interface (GUI) allows users to perform tasks by pointing and clicking rather than typing highly specific…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question