Aracılığıyla paylaş


operator!= (multiset)

Sınamaları işlecinin sol tarafındaki multiset nesne sağ tarafındaki multiset nesneye eşit değil.

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 kümeleri ya da multisets eşit; yoksa yanlış kümeleri ya da multisets eşitse.

Notlar

Multiset nesneler arasında karşılaştırma öğelerini ikili karşılaştırmasını dayanır. Bunlar aynı sayıda öğe varsa ve bunların ilgili öğeleri aynı değerlere sahip iki kümeleri ya da multisets eşit. Aksi halde, bunlar eşit olmayan.

Örnek

// multiset_op_ne.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 );
   }

   if ( s1 != s2 )
      cout << "The multisets s1 and s2 are not equal." << endl;
   else
      cout << "The multisets s1 and s2 are equal." << endl;

   if ( s1 != s3 )
      cout << "The multisets s1 and s3 are not equal." << endl;
   else
      cout << "The multisets s1 and s3 are equal." << endl;
}
  
  

Gereksinimler

Başlık: <set>

Namespace: std

Ayrıca bkz.

Başvuru

Standart Şablon Kütüphanesi