M
Mark Hobley
A program typically has a main function defined as follows:
int main (int argc, char *argv[]) {
/* blah blah */
}
I have noticed that some programs use the syntax:
int main (int argc, char **argv) {
/* blah blah */
}
Is there a difference between the two methods above, or are they
completely interchangeable? Could I change the startup line
from the second example to the startup line in the first without any
effects on the programs behaviour?
Why is the second syntax sometimes used?
Do the differences effect the build in any way?
Are both variants legal and correct in ANSI C (89)?
Thanks in advance to anyone who can help.
Mark.
int main (int argc, char *argv[]) {
/* blah blah */
}
I have noticed that some programs use the syntax:
int main (int argc, char **argv) {
/* blah blah */
}
Is there a difference between the two methods above, or are they
completely interchangeable? Could I change the startup line
from the second example to the startup line in the first without any
effects on the programs behaviour?
Why is the second syntax sometimes used?
Do the differences effect the build in any way?
Are both variants legal and correct in ANSI C (89)?
Thanks in advance to anyone who can help.
Mark.