C++ Double-Ended Queues
Syntax:
You can access individual members of the double-ended queue using the [] operator.
Syntax:
The function assign() sets the double-ended queue the sequence denoted by start and
end, or sets num elements to val.
Syntax:
reference at( size_type pos );
|
The at() function returns a reference to the element at pos in the double-ended
queue.
Syntax:
The function back() returns a reference to the back element of the double-ended queue.
Syntax:
The begin() function returns an iterator to the front element of the double-ended queue.
Syntax:
The clear() function deletes all of the elements from the double-ended queue.
Syntax:
The function empty() returns true if the double-ended queue is empty, and false otherwise.
Syntax:
The end() function returns an iterator to the back of the double-ended queue.
Syntax:
The function erase() erases the element at location pos, or the items between
start and end. The return value is an iterator to the element just after
the last one erased.
Syntax:
The front() function returns a reference to the element at the beginning of the
double-ended queue.
Syntax:
allocator_type get_allocator();
|
The get_allocator() function returns the double-ended queue's allocator.
Syntax:
The insert() function inserts num copies of val before the element at
pos, or inserts the sequence specified by start and end before the
element at pos.
Syntax:
The function max_size() returns the maximum number of items that the double-ended queue
can hold.
Syntax:
The pop_back() function removes the last element from the double-ended queue.
Syntax:
The function pop_front() removes the first element from the double-ended queue.
Syntax:
void push_back( const TYPE &val );
|
The push_back() function adds val to the end of the double-ended queue.
Syntax:
void push_front( const TYPE &val );
|
The function push_front() adds val to the front of the double-ended queue.
Syntax:
The rbegin() function returns a reverse iterator to the back of the double-ended queue.
Syntax:
The function rend() returns a reverse iterator to the front of the double-ended queue.
Syntax:
void resize( size_type num, TYPE val );
|
The resize() function changes the size of the double-ended queue to num, padding
any added entries with elements equal to val.
Syntax:
The size() function returns the number of elements in the double-ended queue.
Syntax:
void swap( dequeue &target );
|
The swap() function swaps the elements in the current double-ended queue with those in
target.