Meaning of argc, argv

What is the meaning of that and this

int main(int argc,char**argv)

Thanks
When you call a program from (say) a command line, you can input a number of arguments into that program. Those arguments are accessible as an array of C-strings in main().

argv is that array of C-strings.
argc is an indicator of how long that array is.

Does this help?

-Albatross
Last edited on
Yes thanks!
Topic archived. No new replies allowed.