What you have written is wrong. It should be
int main(int argc, char *argv) or
int main(int argc, char **argv)
This is another form of main function in C/C++. This is used when you want to pass some data to your program when launching it from command line, script file or other programs.
argc is the no of parameters passed to the main function and argv is an array of C style strings containing the actual arguments passed. So say your program name is myprog. Then if you launch your program from command line like
myprog 1 2 3
then argc will equal to 4 meaning 4 parameters passed, this is because the first parameter is always the full path of the program including the name from where it was launched. So
argv = "full path of the program"
argv = 1
argv = 2
argv = 3
Here are some similar questions :
but none of the answers in them seem as clear as ~ swim ~ 's one here.