apqueue
Class
// apqueue.h #ifndef _APQUEUE_H #define _APQUEUE_H template <class itemType> class apqueue { public: // constructors/destructor apqueue( ); // construct empty queue apqueue( const apqueue & q ); // copy constructor ~apqueue( ); // destructor // assignment const apqueue & operator = ( const apqueue & rhs ); // accessors const itemType & front( ) const; // return front (no dequeue) bool isEmpty( ) const; // return true if empty else false int length( ) const; // return number of elements // modifiers void enqueue( const itemType & item ); // insert item (at rear) void dequeue( ); // remove first element void dequeue( itemType & item ); // combine front and dequeue void makeEmpty( ); // make queue empty private: . . . }; #include "apqueue.cpp" #endif