Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Home » Tip Bank » C++
Language: C++
Expertise: Beginner
Jun 16, 1998

Running other apps from a C++ app

Question:
I recently started programming with Borland C++ Builder and the help files aren't much help at all. I would like to know what the code is for executing another EXE out of an C++ application. In English please.... the help files had some weird computer talk, but I didn't get it.

Answer:
The easiest way is probably to use the system run-time library function.

It's simple enough. If you wanted to run an EXE called c:\text.exe, you could do it like this:

system("c:\text.exe");
The argument to the system function can be anything you can type at the DOS prompt. For example, you can give an argument such as "copy c:\text.exe d:".
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date