Re: [CODE] confused on:

From: Russell Ryan (
Date: 01/26/02

>What does the argv[#] command do?
>What does the argc    command do?

argv[] and argc are not commands, they are variables passed to a program's
(any program, not just circlemud) main() routine by the operating system's
shell. argc is the number of command line arguments typed, and argv[] is an
array holding all the arguments.
argv[0] would address the first command line argument, (if any).

Here is some example code similar to what ive used before in other projects:

int i;
for( i=0; i<argc; i++)

Where proc_cmdline_arg() is a function that handles commandline input.

Hope this clears up some of the confusion,

MSN Photos is the easiest way to share and print your photos:

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT