home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Journal 1990 - 1995 / CUJ.iso / image90 / 9006t1f5.pcx (.png) < prev    next >
PC Paintbrush Image  |  1996-01-31  |  38KB  |  309x430  |  4-bit (4 colors)
Labels: text | screenshot | font | number | black and white | document
OCR: Implemenation of a queue as a linked data structure Queue * Operations supported: **** * enqueue (x) place item x at end of queue head return the Stem at head of queue dequeue remove next item from front of queue empty return true iff queue is empty Data structures qRead pointer to the head of queue QTail pointer to the tail of queue qitem queue member structure *** next pointer to next item on queue anItem the iten itself - must be proper type to contain type of items on queue typedef long member; * storing longs on this queue typedef struct _item item *next; member an!tem; item "quhead = NULL; "qtail - HULL; F item; * Functions * add on iten to queue void enqueve [item x) [ * remove next item from queue void dequeue () [ * return item at head of queue; don't renove member head [} [ .. * 'return true if the queue is empty, false otherwise int empty() [. ---