I have an array of stores with type class "manager" partially defined below:
Code:private: char* LastName; char* Store; char* Specialty;
Driver program creates:
So, this is a storage array of 5 managers!Code:manager store [5];
I have another class (partially defined below) for customers:
However, each manager will service each customer one at a time in a queue created for each manager, and each manager is part of a fixed array.Code:private: char* LastName; char* Age; char* Product;
I am having trouble creating and accessing a DEQUE created for the managers and accessible by the driver:
From the Driver, I want to be able to push a customer to the back or front of the manager queue using something similar to this:Code:#include "Manager.h" #include "Customer.h" #include <deque> : : Manager::Manager() { LastName = NULL; Store = NULL; Specialty = NULL; deque<Customer> CustomerQue; } Manager::Manager(char *last, char *store, char *specialty) { : : deque<Customer> CustomerQue; } void Manager::SetName (char* last) { LastName = _strdup(last); } void Manager::SetCustomerQue (void) { deque<Customer> CustomerQue; }
This obviously does not work and I am thinking it has to be simple. So, how build a deque within a class, accessible from the driver?Code:store[0].CustomerQue.push_front("Williams", "20", "Bicycle");



LinkBack URL
About LinkBacks



