I started off in one book, learning to write C, and my programs always started like this....
But when posting problems I was having in forums, I saw a lot of people do this...
Now I'm using "Learn C on the Mac" as a supplementary text, and in that book, they always default with the
int main (int argc, const char * argv[])
However, they haven't explained any of that.
Would anyone mind telling me why some of you, and this book does that? Rather than what I've been doing? Is this sort of a "default" method of starting each C program, unless I know of exceptions I want otherwise??
What are these (int argc, const char * argv[]) giving me the ability to do?
I assume those are two int's, because I see only one comma. the two being
argc and
const char * argv[]
Thanks
Scott
Code:
#include <stdio.h>
mani{
int
return 0;
}
But when posting problems I was having in forums, I saw a lot of people do this...
Code:
#include <stdio.h>
int main (int argc, const char * argv[]) {
}
Now I'm using "Learn C on the Mac" as a supplementary text, and in that book, they always default with the
int main (int argc, const char * argv[])
However, they haven't explained any of that.
Would anyone mind telling me why some of you, and this book does that? Rather than what I've been doing? Is this sort of a "default" method of starting each C program, unless I know of exceptions I want otherwise??
What are these (int argc, const char * argv[]) giving me the ability to do?
I assume those are two int's, because I see only one comma. the two being
argc and
const char * argv[]
Thanks
Scott