I'm in need of spawning a separate program from my original (parent) program, which in itself is not a problem (yes, i checked out the FAQ at FAQ > Run a program from within a program - Cprogramming.com )
The simple system() call should suffice (I'm assuming i can parametarize it, as I could from a command line)
My question is how to get the result data back from the child process...is it possible? I'm basically looking for a 'return' behaviour as in a function call, but it *has* to be done by an external c program.
My only idea is to make the child process write out the result to a file, and then read it in from the parent, but this fileIO will cripple the speed of my program too much as I need to make hundreds of thousands of those calls...
any solutions or ideas that I'm not aware of would be appreciated