int main(int argc,char* argv[])

argc,argv Useful when compiling programs from the command line.

The meaning of the variable (int argc, char *argv[ ]) in the main function main argc : integer, used to count the number of command-line arguments sent to the main function when you run the program * argv[ ] : pointer array, used to store pointers to your string arguments, each element points to an argument argv[0] points to the full path name of the program to run argv[1] points to the first string argv[2] after the program name is executed on the DOS command line points to the second string after the executor name
  
  
  
  
  

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326793347&siteId=291194637