Compartilhar via


deque::size

Retorna o número de elementos em deque.

size_type size( ) const;

Valor de retorno

O comprimento atual de deque.

Exemplo

// deque_size.cpp
// compile with: /EHsc
#include <deque>
#include <iostream>

int main( ) 
{
   using namespace std;
   deque <int> c1;
   deque <int>::size_type i;
   
   c1.push_back( 1 );
   i = c1.size( );
   cout << "The deque length is " << i << "." << endl;

   c1.push_back( 2 );
   i = c1.size( );
   cout << "The deque length is now " << i << "." << endl;
}
  
  

Requisitos

Cabeçalho: <deque>

namespace: STD

Consulte também

Referência

deque Class

deque::size e deque::resize

Standard Template Library