/*--------------------------------------------------------- * File Name: queuelst.h * Author: Xiannong Meng * Date: April 21, 1997 * Assignment: Classroom demonstration * Problem statement: This is the header file for queue class * templates. *--------------------------------------------------------- */ //enum bool {false, true}; // for Borland and Turbo C++, uncomment it template class Queue { public: Queue(); // constructor bool Insert(const ElmType x); // insert a node with value x to queue bool Remove(ElmType & x); // remove a node containing value x bool IsEmpty() const; // check to see if it is empty private: struct Node // this is the node structure, ElmType { // can be any user-defined type. ElmType info; Node * link; }; Node * front, // front and rear of the queue * rear; };