Mail Archives: djgpp/1997/06/09/08:20:11
Paul Derbyshire <ao950 AT FreeNet DOT Carleton DOT CA> wrote in article
<5ndap9$mgd AT freenet-news DOT carleton DOT ca>...
>
> I've seen char **argv and char *argv[] and am curious which is correct.
Or
> are either correct?
>
They are both the same thing. The array syntax is interchangable with
pointer
arithmetic. Or at least should be if the compiler in question follows the
language
at all.
Personally I have only ever used *argv[]
There may be compilers out there that won't accept **argv, but if they
don't then
I wouldn't use them since they'd probably have other problems.
I don't think either is more correct than the other, although *argv[] is
most
certainly used more.
.
- Raw text -