I know that to use command line arguments in C you do something like this:
int main(int argc, char **argv)
{
//use argc and argv
}
Today I was thinking about it and I realized I have never not seen them called argc
and argv
. Is it a requirement that they are called this or is it just convention? If it is required why is this the case?
Could I do something like this:
int main(int length, char**myinput){
//use length as you would argc and myinput
// as you would argv
}
I haven't had a chance to write a program to test it out yet.