Materialised <ma**********@privacy.net> scribbled the following:
Hi,
I often see 2 different declairations of the main() function, and I am
unsure of the difference. They are
int main(int argc, char *argv[])
int main(int argc, char **argv[])
What is the difference?
And are they both complient with the ANSI standard?
The difference between these is that they declare parameters of
different type.
In the first, the parameter argv is of type "pointer to pointer to
char", but in the second, it's of type "pointer to pointer to pointer
to char".
The first complies with the ANSI standard, the second does not.
You might as well be asking what is the difference between int *i and
int **i.
--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\--
http://www.helsinki.fi/~palaste --------------------- rules! --------/
"We sorcerers don't like to eat our words, so to say."
- Sparrowhawk