Quote:
Originally posted by gamehack
And how can I execute a command from a C++ program ? For example, tar zxvf somefile.tar.gz ?
|
See:
man 3 system
man 3 exec
man 3 popen
Use system() if you just want to execute a program.
Use popen if you need to talk to the stdin/stdout of the command you run from your program.
Use execl() / execlp() / execle / execv() / execvp() if you want to exti your program and run another instead.