I see the main() function usually called as:
int main(int argc, char** argv)int main(int argc, char* argv[])int main(void)
Related to these definitions:
- Technically speaking, for
char** argvandchar* argv[]is one preferred over the other or are these 100% interchangeable? - Because both the
argcand argument strings (should be?) immutable, why aren't they bothconst? Or is this something that doesn't matter and it's just omitted out of convention/historical purpose? I suppose this could be done with:const char **argv = (const char **) argv;but curious why this isn't already done (would there be reasons for changing the arguments that are received, for example?)