// main.cpp // ---------------------------------------------------------------------- // Do not modify this file. // // CSE 143 // Homework 2 // http://www.cs.washington.edu/education/courses/143/00su/homework/hw2/ // 25 Jun 2000; Ken Yasuhara #include #include #include "library.h" const int MAX_BOOK_COUNT = 100; const int MAX_FILENAME_LENGTH = 80; int main(void) { // all book information stored here LibraryBook bookList[MAX_BOOK_COUNT]; char fileName[MAX_FILENAME_LENGTH]; cout << endl << "Name of file with book data? "; cin >> fileName; // // read book data from file // int bookCount; readBookFile(fileName, bookList, MAX_BOOK_COUNT, bookCount); if (bookCount <= 0) { cerr << "no books read" << endl; waitForChar(); return -1; } printBookList(bookList, bookCount); // // read and process borrow transactions from file, // indicating fines where applicable // cout << endl << "Name of file with transaction log? "; cin >> fileName; processTransactionsFile(fileName, bookList, bookCount); waitForChar(); return 0; } // end main