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;

// Shows environment variables obtained through command line
int main (int argc, char *argv[], char *envp[]) {
   for (int i=0 ; envp[i] != NULL ; i++)
      cout << "envp[" << i << "] = " << envp[i] << "\n";
}