queuetest

queuetest - /* @file queuetest.cpp @author William E....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/** @file queuetest.cpp @author William E. Duncan @date 2005-11-15 Description: linked-list-based queue implementation. Course: CS1254.02 Logon ID: cs1254xx Lab #: 6 Instructor: William Duncan @comment Do not modify this file in anyway. It is intended to test your implementation. */ #include <iostream> #include <string> #include "queuetools.h" #include "queuetools.cpp" #include "queue.h" #include "queue.cpp" using namespace std; template<typename QueueItemType> void printQReverse(const Queue<QueueItemType>& Q); int main(int argc,char **argv) { int iitem; Queue<int> intQueue; string sitem; Queue<string> stringQueue; if (stringQueue.isEmpty()) cout<<"My queue is currently empty"<<endl; stringQueue.enqueue("Jeremy"); cout<<"'Jeremy' successfully enqueued."<<endl; if (stringQueue.getQueueFront(sitem)) cout<<sitem<<" is at the front of the queue."<<endl; stringQueue.enqueue("Kathryn"); cout<<"'Kathryn' successfully enqueued."<<endl; if (stringQueue.getQueueFront(sitem)) cout<<sitem<<" is at the front of the queue."<<endl;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

queuetest - /* @file queuetest.cpp @author William E....

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online