A main function with no formal parameters is generally written as:
int main () or int main (void)
Indicates that the Mian function has no arguments, and that no arguments are required to invoke the Mian function.
And the form of the main function's physical parameter:
int main (int argc, char** argv)
int main (int argc, char *argv[])
I understand these two ways, the first of which is the pointer, the pointer to the variable, the pointer is an address, so *ARGV is a **argv. The second type of *argv[] is an array of pointers, because [] has a higher precedence than *, so argv[] is an array, and the array name actually represents the first address, or an address. So there is no difference between the two methods.
Write such a test code under the VS2010
int main (int argc, char * * argv)
{
Iplimage *img = Cvloadimage (argv[1), 1);
Cvnamedwindow ("initial", 1);
Cvshowimage ("initial", IMG);
Cvdestroyallwindows ();
Cvreleaseimage (&img);
return 0;
Where Argv[1] represents the fact that the second argument in the command-line argument is interpreted, and in this case he is a picture path, because the first parameter is the executable file name given by the operating system.
Under the compiler, the property-debug-command arguments are written to the picture path