Manager.h #define MAX_HOLIDAY 10 #define MAX_MAGICIAN 10 struct Holiday { string
ID: 3548768 • Letter: M
Question
Manager.h
#define MAX_HOLIDAY 10
#define MAX_MAGICIAN 10
struct Holiday
{
string customer;
string magician;
};
struct Magician
{
string customer;
string holiday;
};
class Manager
{
private:
list<string> m_MagiciansList;
list<string> m_HolidaysList;
list<Holiday> m_ListOfBookingForEachHoliday[MAX_HOLIDAY];
list<Magician> m_ListOfBookingForEachMagician[MAX_MAGICIAN];
list<Magician> m_ListOfCustomerWaitingForAHoliday;
void loadFile(string fileName, list<string>& myList);
void loadScheduleFile();
bool getMagicianIndex(string holiday, int& index);
bool getHolidayIndex(string holiday, int& index);
public:
Manager(void);
string getCustomerName();
string getMagicianName();
string getHoliday();
void status();
void cancel(string customer, string holiday);
void schedule(string customer, string holiday);
void quit();
};
Explanation / Answer
I have gone through your code and modified it. I try to post to it in here but cannot post as the code is greater that 65000 characters. I have added the link below. There was a error in you main.cpp file. The variable holidaysNumber was uninitialized. I added code to rectify it and it is compling fine for me. If you can provide me with the files that are required for it running I can give u the output also.
http://pastie.org/8563703
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.