using namespace std; #define _CRT_SECURE_NO_DEPRECATE #ifndef GUESTLINKEDLISTCLASS_H_ #define GUESTLINKEDLISTCLASS_H_ const int MAX_NAME = 35; // max name length const int MAX_MEAL_TYPES = 3; // max meal types const int MAX_DELETES = 4; // max deletes const int MAX_UPDATES = 3; // max updates const int WIDTH1 = 15; // WIDTH1 for setw const int WIDTH2 = 12; // WIDTH2 for setw enum MealType{VEG,STK,CHICK}; // enumerations static const char * const MEAL_NAMES[] = {"Vegetarian", "Steak", "Chicken"}; //char array of meal names static const char * const DELETE_NAMES[MAX_DELETES] = {"Beachum", "Fred", "Ponzo", "Mironoff"}; // char array of names struct DinnerGuest { char guestName[MAX_NAME]; // cstring - name of dinner guest MealType mealTyp; // VEG vegetarian, STK steak, CHICK chicken DinnerGuest * next; //pointer to next guest in list }; class DinnerGuestList // class DinnerGuestList { public: DinnerGuestList(); // Constructor ~DinnerGuestList(); // Destructor bool UpdateGuest(char name[], MealType meal); // prototype for UpdateGuest void PrintGuestList(fstream & outFile); // prototype for PrintGuestList void PrintMeals(fstream & outFile); // prototype for PrintMeals void InsertSorted(char name[], MealType meal); // prototype for InsertSorted bool IsPresent( const char * const guestName); // prototype for IsPresent void DeleteGuest(const char * const guestName); // prototype for DeleteGuest private: void PrintChar(fstream & outFile, char ch, int howMany); // prototype for PrintChar void FreeMem(); // prototype for FreeMem int numOfMeals[MAX_MEAL_TYPES]; // int array for meals DinnerGuest * head; // DinnerGuest pointer }; // class DinnerGuestList #endif /*GUESTLINKEDLISTCLASS_H_*/