Computer Science 2574 |
Intro to Data Structures & Soft Eng
|
#include "odb.h" //************************************************************************** // Function: main // Purpose : Controls DOG program // Called By: NONE // Calls: clearscreen, fexist, startscreen, BuildList, odbmenu // Parameters: Command line // Return Value: int 0 // Authors: John W. Boyd III & Cullen J. Morris // Version: 1.1 //************************************************************************** int main(int argc, char **argv) { int savenum = 0; ifstream inFile; ofstream datafile; if (argc > 1) // checks for command line parameters { datafile.open(tempfile); datafile << argv[1]; datafile.close(); if (fexists(argv[1])) // checks for file existance inFile.open(argv[1]); else { clearscreen(); cout << endl; cout << "File doesn't exist. Program exited." << endl; exit(0); } clearscreen(); startscreen(); BuildList(inFile, ResultNum); //build list from odb } else // if no command line parameters { clearscreen(); startscreen(); } odbmenu(); clearscreen(); return 0; }