//--------------------------------------------------------- // Proj1.C CMSC 341 Fall 2002 // // Driver program for project 1, CMSC 341, Fall 2002 // // // This file is to be use as-is; without changes. //------------------------------------------------------------ #include #include "AList.H" #include "Proj1_aux.H" int main (int argc, char *argv[]) { bool intString = false, stringInt = false; ifstream commands; // Parse the command line. Function exits for invalid command line. // Determine whether the AList has int/string or string/int key/value // pairs. Open the command file. getCmdLine (argc, argv, intString, stringInt, commands); // Create the appropriate kind of AList and process commands. if (intString) { AList alist[10]; processIntStringCommands(alist, commands); } else if (stringInt) { AList alist[10]; processStringIntCommands(alist, commands); } else { cerr << "Invalid command line\n"; } if (commands.is_open()) commands.close(); }