The basic usage of the queue

. 1 header: #include <Queue> 
 2 defined: Queue < int > Q;
 . 3 libraries: q.empty ();          // Returns true if the queue is empty, otherwise to false      
. 4       q.size ();           // Returns the number of elements in the queue 
. 5       q.front ();          // return the element head of the queue without deleting the element 
. 6       q.pop ();            // pop force the first element but does not return a value 
. 7       q.push ();           / / the element is pressed into the queue 
. 8       q.back ();           // returns the value of the tail element, but does not delete the element

 

Guess you like

Origin www.cnblogs.com/TYXmax/p/10988483.html