|
if(argc>1) means if there's more than one argument passed from main. Everytime you leave a space when calling a program, and then add another string after the name of the program, you're passing arguments to it. The first argument is the name of the program, the second argument is, in this case, "-d." argc just counts arguments.
if(strcmp(argv[1], "-d") == 0)
means if argv[1] (argument passed from main) is -d then you do whatever code that follows.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
|