I need to perform a formatted system call, something like this.
char *buf = "const.c";
exec("cat %s >> out", buf);
where exec is the hypothetical function. I just need something that can give formatted system calls, and how to use it.
I need to perform a formatted system call, something like this.
char *buf = "const.c";
exec("cat %s >> out", buf);
where exec is the hypothetical function. I just need something that can give formatted system calls, and how to use it.
Use sprintf():
http://cboard.cprogramming.com/showthread.php?t=52075