Re: main(int argc, char *argv[])
- From: Michael Mair <Michael.Mair@xxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 23:55:16 +0200
CBFalconer wrote:
Michael Mair wrote:
David Resnick wrote:
... snip ...
Anyway, you could always call main later with main(0,NULL). Or if you want, you could squirrel away (in a static) the original argc and argv and reinvoke main with them later.
Not exactly. argv[argc] must be NULL, i.e. you need main(0, p), where *p==NULL.
No, they will be so on the initial call of main. Once that happens what you do next is up to you. For example, argc will hold a positive value on the initial call. You could use that to detect a recursive call by passing a negative argument. It all sounds highly purposeless though.
You are of course right, see my reply to David Resnick's answer.
Cheers Michael -- E-Mail: Mine is an /at/ gmx /dot/ de address. .
- References:
- main(int argc, char *argv[])
- From: Sokar
- Re: main(int argc, char *argv[])
- From: David Resnick
- Re: main(int argc, char *argv[])
- From: Michael Mair
- Re: main(int argc, char *argv[])
- From: CBFalconer
- main(int argc, char *argv[])
- Prev by Date: Re: return a string
- Next by Date: Re: return a string
- Previous by thread: Re: main(int argc, char *argv[])
- Next by thread: Re: main(int argc, char *argv[])
- Index(es):