Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!cg-atla!fredex From: fredex@cg-atla.UUCP (Fred Smith) Newsgroups: comp.lang.c Subject: Re: C-Execute-Command Message-ID: <8128@cg-atla.UUCP> Date: 4 Dec 89 16:38:42 GMT References: <2615@servax0.essex.ac.uk> Reply-To: fredex@cg-atla.UUCP (Fred Smith) Organization: Agfa Compugraphic Division Lines: 25 In article <2615@servax0.essex.ac.uk> georg@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