/////////////////////////////////////////////////////// // comargs.cpp - How do I access the command line? // /////////////////////////////////////////////////////// #include using namespace std; // Optional arguments in the main parameter list provide // access to arguments typed onto the command line // argc counts the number of arguments // argv is an array of pointers to the arguments // argv[0] is always the name of the running program void main(int argc, char *argv[]) { cout << "\n "; int i; for(i=0; i