multiset::size
Retorna o número de elementos em multiset.
size_type size( ) const;
Valor de retorno
O comprimento atual de multiset.
Exemplo
// multiset_size.cpp
// compile with: /EHsc
#include <set>
#include <iostream>
int main( )
{
using namespace std;
multiset <int> ms1;
multiset <int> :: size_type i;
ms1.insert( 1 );
i = ms1.size( );
cout << "The multiset length is " << i << "." << endl;
ms1.insert( 2 );
i = ms1.size( );
cout << "The multiset length is now " << i << "." << endl;
}
Requisitos
Cabeçalho: <set>
namespace: STD