#ifndef INT_QUEUE_H #define INT_QUEUE_H #include using namespace std; class UnderflowException { }; class IntQueue; ostream & operator<< ( ostream & out, const IntQueue & q ); class IntQueue { public: IntQueue( ); IntQueue( int x ); IntQueue( const IntQueue & q ); ~IntQueue( ); const IntQueue & operator= ( const IntQueue & rhs ); bool isEmpty( ) const; int size( ) const; void clear( ); void enqueue( int x ); int dequeue( ); int getFront( ) const; void print( ostream & out = cout ) const; bool operator== ( const IntQueue & rhs ) const; bool operator== ( int rhs ) const; static int activeQueues( ); private: struct Node { int data; Node *next; Node( int d, Node * n = NULL ); }; Node *front; Node *back; int theSize; static int numberOfQueues; }; ostream & operator<< ( ostream & out, const IntQueue & q ); bool operator==( int lhs, const IntQueue & rhs ); #endif