By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,513 Members | 1,611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,513 IT Pros & Developers. It's quick & easy.

How do I run an exe file from a C++ windows application program?

P: 11
Hi I have some exe files compiled from FORTRAN source codes and need to run them from a C++ windows application program so that I can monitor them and choose some parameters for them. Could any body please tell me how to make such a C++ program to run these exe files as simple as I just click a button? Thanks in advance!
May 30 '07 #1
Share this Question
Share on Google+
4 Replies


pbmods
Expert 5K+
P: 5,821
Heya, driplet. Welcome to TSDN!

I'm moving your thread to the C++ forum where it will receive more relevant exposure.
Jun 4 '07 #2

gpraghuram
Expert 100+
P: 1,275
Hi,
If u want to call the application from ur c++ application then u can use system() function call to achieve the same.

Thanks
Raghuram
Jun 4 '07 #3

P: 11
thank Moderator for moving my post to a right place.

and thank gpraghuram for answering my question.
Jun 4 '07 #4

AdrianH
Expert 100+
P: 1,251
Hi,
If u want to call the application from ur c++ application then u can use system() function call to achieve the same.

Thanks
Raghuram
system() will execute the executable, but it will stop the C++ app until the executable is done executing.

You might want to try posix_spawn() or if you are using a Windows environment, use CreateProcess().


Adrian
Jun 4 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.