Aracılığıyla paylaş


operator> (multiset)

Multiset nesne işlecinin sol tarafındaki multiset nesnesini sağ tarafındaki'den büyük ise sınar.

bool operator>(
   const multiset <Key, Traits, Allocator>& _Left,
   const multiset <Key, Traits, Allocator>& _Right
);

Parametreler

  • _Left
    Bir nesne türü multiset.

  • _Right
    Bir nesne türü multiset.

Dönüş Değeri

gerçek multiset işlecinin sol tarafındaki; işlecinin sağ tarafındaki multiset büyükse Aksi halde yanlış.

Notlar

Multiset nesneler arasında karşılaştırma öðelerinin yapılandırdı Karşılaştırmasında esas alır.Büyük-iki nesne arasındaki ilişki ilk çifti eşit olmayan öğelerin Karşılaştırmasında dayalı çok.

Örnek

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

int main( )
{
   using namespace std;
   multiset <int> s1, s2, s3;
   int i;

   for ( i = 0 ; i < 3 ; i++ )
   {
      s1.insert ( i );
      s2.insert ( i * i );
      s3.insert ( i - 1 );
   }

   if ( s1 > s2 )
      cout << "The multiset s1 is greater than "
           << "the multiset s2." << endl;
   else
      cout << "The multiset s1 is not greater "
           << "than the multiset s2." << endl;

   if ( s1 > s3 )
      cout << "The multiset s1 is greater than "
           << "the multiset s3." << endl;
   else
      cout << "The multiset s1 is not greater than "
           << "the multiset s3." << endl;
}
  
  

Gereksinimler

Başlık: <set>

Namespace: std

Ayrıca bkz.

Başvuru

Standart Şablon Kütüphanesi