popen vs fopen
i am trying to find out the difference between popen() and fopen() for a linux based code. Can't seem to find reference to popen anywhere!!
in my code i use:
but i actually want to write the dat_file to a different location. The program i am in goes to a different directory (the data directory) to look for data and works with it in that location, so how can i write dat_file to the working directory where the code was first called (as i do not have write permissions in the data directory) is popen the way forward??
does popen actually run a shell? like system?
i thought popen was safer than system because it doesn't run a shell.
yes, you can call me a pedant.