execute another program from a... program

Let's say a I have a compiled a code in linux and the result is a.out.
Can i write some code that at some point calls ./a.out -t smth?

1
2
3
int x = 0;
x = ./a.out -t smth;
return x;
Last edited on
This will have the information you likely are looking for:

https://stackoverflow.com/questions/15435994/how-do-i-open-an-exe-from-another-c-exe
Topic archived. No new replies allowed.