Mail Archives: djgpp/1998/12/18/14:56:34
On Fri, 18 Dec 1998, Marcus Rohrmoser wrote:
) Define main as
) `int main(int argc, char** argv)`
) and you`ll have the number of arguments in `argc` and the values in
) argv[1] to argv[argc]. argv[argc+1] is NULL by definition. argv[0] is
) the program`s name.
Actually, the values go from argv[1] to argv[argc-1], where argv[argc] is
NULL by definition.
The argument count includes *all* arguments, including the very first one
(argv[0]).
--
Daniel Reed <n AT ml DOT org>
It is better to be defeated on principle than to win on lies. -- Arthur Calwell
- Raw text -