//#######################################################################
// Author: Sherry Towers
// Created: Feb 1, 2013  
//
// C++ example code that shows how to pass arguments to main on the
// command line
//
// argc is the number of arguments detected (always at least one, because
// the first argument is the name of the program)
// argv is an array of strings containing the arguments.
// Indexing of arrays in C++ always starts with 0.
//#######################################################################
#include <iostream>
 
using namespace std;

int main(int argc, char **argv){
  cout << "The name of the program is: " << argv[0] << endl;
  cout << "The arguments passed to the program are\n";
  for (int n=1; n<argc; n++){
    cout << n << ": " << argv[n] << '\n';
  }
  return 0;
}
