apqueue - //

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: // ******************************************************************* // Last Revised: 8/14/98 // // APCS queue class IMPLEMENTATION // // queue implemented using the APCS vector class // based on queue class in Mark Weiss' : Algorithms, Data Structures, // and Problem Solving with C++ // ******************************************************************* / #include "apqueue.h" #include <stdlib.h> # const int QDEFAULT_SIZE = 10; // default initial queue size c template <class itemType> apqueue<itemType>::apqueue() : mySize(0), myFront(0), myBack( -1 ), myElements(QDEFAULT_SIZE) // postcondition: the queue is empty { } template <class itemType> apqueue<itemType>::apqueue(const apqueue<itemType> & q) : mySize(q.mySize), myFront(q.myFront), myBack(q.myBack), myElements(q.myElements) // postcondition: queue is a copy of q { } template <class itemType> apqueue<itemType>::~apqueue() // postcondition: queue is destroyed { // vector destructor takes care of memory } template <class itemType> const apqueue<itemType> &...
View Full Document

Page1 / 4

apqueue - //

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