#include // This program is to show how to access the Command Line // ARGuments in a C/C++ program. // // The name of the program is found at argv[0] int main (int argc, char** argv) { int i; printf ("This program contains %d Command Line Arguments.\n\n", argc); for (i = 0; i < argc; i++) { printf ("argv[%d]: *%s*", i, argv[i]); if ('-' == argv[i][0]) printf (" is a flag."); printf ("\n"); } return 0; }