20-CS-122-001 Computer Science II Spring 2012
Command Line Arguments

Virtual functions, classes, inheritance, lists, queues, stacks, applications

Prev      Next      Lectures      Source

#include <iostream>
using namespace std;

int main (int argc, char *argv[]) {
   cout << "argc = " << argc << "\n\n";
   for (int i=0 ; i < argc ; i++)
      cout << "argv[" << i << "] = " << argv[i] << "\n";
}