Queue - void DeQueue() { container.RemoveFirst(); } const...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/*************** THE Queue CLASS ***************/ #ifndef __QUEUE__ #define __QUEUE__ #include "SList.h" template <class T> class Queue { public: bool IsEmpty() const { return container.IsEmpty(); } void EnQueue(const T& item) { container.AddLast(item); }
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: void DeQueue() { container.RemoveFirst(); } const T&amp; Front() const { return container.ShowFirst(); } private: SList&lt;t&gt; container; }; #endif...
View Full Document

Ask a homework question - tutors are online