Mail Archives: djgpp/1998/11/03/17:10:10
Eli Zaretskii wrote:
> No, it looks like this:
>
> int main (int argc, char **argv);
Nope. ANSI C 5.1.2.2.1 dictates that the declaration for main must be
either
int main(void);
or
int main(int argc, char *argv[]);
Note the argument is an array of pointers, not a pointer to a pointer.
> I know, **argv and *argv[] are essentially the same, but the ANSI
> standard explicitly uses the former.
Not sure how pedantic one needs to be on this. ANSI dictates that an
array argument to a function is _identical_ to a pointer argument of the
same type, so char *argv[] as a function argument really is the same
thing as char **argv.
--
Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900
Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com
San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/
USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE
\
/ Whoever named it necking was a poor judge of anatomy.
/ Groucho Marx
- Raw text -