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!
I have another class (partially defined below) for customers:
Code:
private:
char* LastName;
char* Age;
char* Product;
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.
I am having trouble creating and accessing a DEQUE created for the managers and accessible by the driver:
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;
}
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:
store[0].CustomerQue.push_front("Williams", "20", "Bicycle");
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?