Rajinder Yadav - Windows C++ Development Tools & Resources :Design, Code, Test, Deploy
STL Basics
STL Intro
Big 3 Rule
Namespace
Iterator
STL End Node
Size vs Capacity
Performance
Adaptors
Algorithmn
Functors
Containers
Container Adaptors
STL Reference
vector
list
deque
queue
stack
map
multimap
set
multiset
C++ Standard Type Library

#include <queue>
template class Type, class Container deque<Type> > class queue
Parameters
Type - Element data type.
Allocator - Memory allocator/deallocator, optional.

Constructors

deque( );

explicit deque( const Allocator& aloc);

explicit deque( size_type count );

deque( size_type count, const Type& val );

deque( size_type count, const Type& val, const Allocator& aloc );

deque( const deque& src );

template
<class InputIterator>
deque( InputIterator start, InputIterator end )
;

template
<class InputIterator>
deque( InputIterator start, InputIterator end, 
const Allocator& aloc );

Parameters

  aloc  - Allocator class
  count - Initial elements in the queue
  val   - Initialized value of elements
  src   - Source queue to be copied
  start - First element in the range
  end   - Last element in the range

Methods
assign()Erases elements from a deque and copies a new set of elements to the target deque.
at()Returns a reference to the element at a specified location.
back()Returns a reference to the last element.
begin()Returns a random-access iterator to the first element in the container.
clear()Remove all elements.
empty()Check if container is empty.
end()Returns a random-access iterator that points just beyond the end of the container.
erase()Removes an element or a range of elements from the specified positions.
front()Returns a reference to the first element.
get_allocator()Returns the allocator object.
insert()Inserts element or a number of elements at the specified position.
max_size()Get the maximum length.
pop_front()Remove the element from the head.
push_back()Insert element to the tail.
rbegin()Get reverse iterator to the first element.
rend()Get reverse iterator to the end element.
resize()Set new size for the container.
size()Get the count of elements.
swap()Swap elements between two contaiiners.


Usage
STL Home

Copyright © 2007 Rajinder Yadav, All rights reserved