Re: main(int argc, char *argv[])



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. .