What I'd like to do is have my C++ code open up Mplus (statistical program that I've downloaded on my computer) and run it. Is it possible?
-
2The answer to this is OS dependent. Which OSes are you targeting?Magnus Hoff– Magnus Hoff2014-04-14 17:00:06 +00:00Commented Apr 14, 2014 at 17:00
-
Please look at [stackoverflow.com/questions/9550488/…. It explains the same issue. [1]: stackoverflow.com/questions/9550488/…ptrehan– ptrehan2014-04-14 17:04:41 +00:00Commented Apr 14, 2014 at 17:04
-
1It is always possible that if you try to describe what you are attempting to achieve, someone could recommend a better way of accomplishing your goal.StephenH– StephenH2014-04-14 17:07:21 +00:00Commented Apr 14, 2014 at 17:07
-
is it worth it to make a program just for that ? why not just write a shell script ?Moha the almighty camel– Moha the almighty camel2014-04-14 17:19:42 +00:00Commented Apr 14, 2014 at 17:19
Add a comment
|
1 Answer
You may be able to do what you want with std::system() calls like:
std::system("program -e input_commands.txt"); // Assuming it accepts some sort of command line args
std::system("program < input_commands.txt"); // Assuming it responds to stdin
It depends on the program if this approach will work.