C-Execute-Command

Fred Smith fredex at cg-atla.UUCP
Tue Dec 5 03:38:42 AEST 1989


In article <2615 at servax0.essex.ac.uk> georg at essex.ac.uk writes:
>
>
>
>*******************************************************************************
>_______________________________________________________________________________
>            Does anybody know how to call an executable file from
>                               a c-program ?
>                      I am using the Unix-CC copiler.
>_______________________________________________________________________________
>									Hgg89.
>
> 


If you want to execute a program named "SubProgram" from within an already
running program, an easy way to do it is to use a statement like this:

        system ("SubProgram");

This assumes that SubProgram is located in a place that is on your path.

There are other ways, too, but this one is probably easiest.

Fred



More information about the Comp.lang.c mailing list