Programs can be started with different parameters. When opening your program with these parameters, argc and argv are used.
argc means argumentcount (or, the number of arguments passed). If your program was called bob and you called your program like this: bob.exe lol lol
There would be 3 arguments. There is always at least one argument, which is the exact location of your program, and the program name. The next ones are all parameters.
argv is, as you can see, an array of char*. This means that it's an array of C-strings. These are the actual arguments themselves. In the previous example, this is what argv looks like:
1 2 3 4 5
|
{
"bob.exe\0",
"lol\0",
"lol\0"
}
|
So argv[0] would return "bob.exe\0", argv[1] would return "lol" and for example argv[2][0] would return "l" (since that's the first character of the second parameter.
So, it won't affect any other functions, it just adds the possibility to open your program with parameters, to control it at the moment you call it.