I want to execute the following sequence of statements:
1 2 3 4 5 6 7 8
int main()
{
// do some work x
// call external.exe with data x
// read output produced by external.exe
return 0;
}
I have two main problems:
(1) It is said that system() is not safe, is there an alternative to run an application from within an application?
(2) The external writes output to a file, I want main() to read this output once external finishes execution. Any ides on how to accompish that?