August 2012
Intermediate to advanced
976 pages
30h 17m
English
The queue and priority_queue adaptors are defined in the queue header. Table 9.19 lists the operations supported by these types.
Table 9.19. queue, priority_queue Operations in Addition to Table 9.17
The library queue uses a first-in, first-out (FIFO) storage and retrieval policy. Objects entering the queue are placed in the back and objects leaving the queue are removed from the front. A restaurant that seats people in the order in which they arrive is an example of a FIFO queue.
A priority_queue lets us establish a priority among the elements held in the queue. Newly added elements are placed ahead of all the elements with ...
Read now
Unlock full access