Compartilhar via


multiset::reference

Um tipo que fornecesse uma referência a um elemento armazenado em um multiset.

typedef typename allocator_type::reference reference;

Exemplo

// multiset_ref.cpp
// compile with: /EHsc
#include <set>
#include <iostream>

int main( )
{
   using namespace std;   
   multiset <int> ms1;

   ms1.insert( 10 );
   ms1.insert( 20 );

   // Declare and initialize a reference &Ref1 to the 1st element
   const int &Ref1 = *ms1.begin( );

   cout << "The first element in the multiset is "
        << Ref1 << "." << endl;
}
  

Requisitos

Cabeçalho: <set>

namespace: STD

Consulte também

Referência

multiset Class

Standard Template Library