Mail Archives: djgpp/1999/06/28/19:35:50
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.
- Raw text -