man, i came up with that already but it was by accident. I should have listened in C programming. the thing is, i hated pointers, im pretty much good at everything else except pointers. Thanks anyways. I came up with the Queue and QueueIteam definitions already.
Code://member function definitions for class Date
#include <iostream> //allows program to output data on screen
using std::cout;
using std::endl;
using namespace std;
#include <iomanip>
using std::setfill;
using std::setw;
#include <string>
using std::string;
using std::strcpy;
#include "Queue.h" //include definition of class Queue from Queue.h
Queue::Queue ()
{
mpHead = NULL;
mpTail = NULL;
}
void Queue::addItem(char *pData)
{
//create and initialize new QueueItem dynamically
QueueItem *pQI = new QueueItem(pData, ++mNodeCounter);
if ( NULL == mpHead ) //
mpHead = mpTail = pQI;
else
{
// li
mpTail = pQI;
}
}
void Queue::removeItem()
{
delete mpHead;
}
void Queue::printList()
{
cout << mpHead << endl;
cout << mNodeCounter << endl;
}
Queue::~Queue()
{
}
Code://member function definitions for class QueueItem
#include <iostream> // allows program to output data
using namespace std;
#include <string>
#include "QueueItem.h" // include definition of class QueueItem from QueueItem.h
QueueItem::QueueItem(char *pData, int id)
{
id = mNodeID;
pData = mData;
}
void QueueItem::setNext(QueueItem *pItem)
{
QueueItem* mpNext = pItem;
}
QueueItem* QueueItem::getNext()
{
return mpNext;
}
int QueueItem::getId()
{
return mNodeID;
}
const char* QueueItem::getData()
{
return mData;
}

