#include "list.h" template class QUEUE { private: typedef aNode node; typedef node *link; link head, tail; public: QUEUE(int n) { head = 0; tail = 0; } int empty () const { return head == 0 ; } Item get () { Item v = head->item; link t = head->next; delete head; head = t; return v; } void put (Item x) { link t = tail; tail = new node(x, 0); if (head == 0) head = tail; else t->next = tail; return; } } ;