As was stated earlier, what ever your command line can accept can go into the string passed to the system() call. So if the program you wish to invoke is in /home/me/bin, is named test1, takes an input file name for an argument, and you wish stdout to be written to a file, the string might look like this:
"/home/me/bin/test1 < myinputfile > myoutputfile"
Note that this isn't very flexible if the string were hard-coded: You must recompile if you change any options.
|