From: Darren Noble To: djgpp AT delorie DOT com Subject: Re: Command Line parameters Date: Mon, 28 Jun 1999 17:34:32 -0600 X-Mailer: KMail [version 1.0.17] Content-Type: text/plain References: <19990628174003 DOT 22728 DOT 00000953 AT ng-ch1 DOT aol DOT com> MIME-Version: 1.0 Message-Id: <99062817374600.00590@dome.calderathin.com> Content-Transfer-Encoding: 8bit Reply-To: djgpp AT delorie DOT com On Mon, 28 Jun 1999, you wrote: > Could someone show me an example of command line parameters, please. I'm > working on a project that would have input like: > > program_name parameter1 parameter2 parameter3 > > That sort of thing. > > Thanks, > Tom Beauchamp when you declare main use the following syntax: main(int argc, char argv[]) argc is the number of arguments that are being passed in. argv[] is a 2 dimesionall array of chars. 0 is the path and the program name of the program being ran.