First page Back Continue Last page Graphics
enQueue ( )
- bool IntQueue::enQueue(const int & value)
- {
- if ( isFull ( ) ) return false;
- Node * add = new Node;
- if ( add == NULL ) return false;
- add->value = value;
- add->next = NULL;
- items++;
- if ( front == NULL ) front = add;
- else rear->next = add;
- rear = add;
- return true; }