I need to use a '.exe' file to operate through the C++ program. I am using system(). for the operation of the '.exe' file, I need to put some command to the '.exe' file after opening. I dnt understand how to put the command.
system always work but too dangerous.
and also when you use system your application stay ready until that application end. which is not good.
sometimes system goes buggy, and result in too many errors! I've never figured out how to resolve them.
I am using windows!! I have a program (model) that is written in FORTRAN. I need to use the same program (exe) with some parameters changed repeatedly using the C++.
Sorry!! I could not explain the problem properly. I am using the exe file of the fortran code via the command prompt. while using the exe file i need to write the following in the command prompt...
daycent -n example -s example1
example is a input file to the exe. and example1 is the output file. I want to do this step only using the C++
Use CreateProcess() as you have been told, system() has few major issues you will encounter sooner or later, like using .exe name which contains spaces in it :)
_ You need to scape special characters (spaces)
_ http://ss64.com/nt/start.html you are using it incorrectly (¿is there a need for start?)
_ ¿What do you expect to do with the output? You are just printing it to screen... (¿why don't just create a batch file?)