Use this diagram to answer the following questions. |
nil
NULL
struct node { int jobNumber; node* link; }; struct Qnode { node* front; node* rear; }; Qnode Q; void dequeue (Qnode &Q, int &nextJob) // Removes first job number from queue { node* temp; if ( Q.isEmpty( ) ) cout << "Queue is empty." << endl; else { nextJob = Q.front -> jobNumber; temp = Q.rear Q.front = front -> link; delete temp; if (Q.front) rear = NULL; } }