#include <deque>
template < class Type, class Allocator=allocator<Type> > class deque
Parameters
Type - Element data type.
Allocator - Memory allocator/deallocator, optional.
Constructors
deque( );
explicit deque( const Allocator& _Al );
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 deque
val - Initialized value of elements
src - Source deque 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_back() | Remove the element from the tail. |
| pop_front() | Remove the element from the head. |
| push_back() | Insert element to the tail. |
| push_front() | Insert element to the head. |
| 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
|