Ok, I have three queueus, MM, FP & TXT. Each of them contain objects which have variables associated with them. How do I access any of the variables that the front of my Queue points to?
For example, I am trying to print out the name of the item that is in the begginning of my MM queue.
I want to type something like...
cout<<mm.front.name<<;
but that doesn't work. I tried many variations on that but to no avail. Below is my pertinent code. Any help is greatly appreciated. Thanks!
class NodeType
{
public:
job info;
NodeType* next;
NodeType* back;
};
class Queue
{
public:
Queue();
~Queue();
void makeEmpty();
void addFrontNode(job newJob);
void addRearNode(job newJob);
void delNode(job &delJob);
bool isEmpty() const;
bool isFull() const;
int getItems();
int items;
NodeType* front;
NodeType* rear;
};
class job
{
public:
int switches, fTime, sTime;
int length, aTime;
string name;
string type;
string urgent;
string getName()
{
return name;
}
job()
{
switches=0;
fTime=0;
sTime=0;
};
~job()
{
};