Aracılığıyla paylaş


operator!= (hash_set)

[!NOT]

Bu API artık kullanılmıyor.Alternatif unordered_set Class.

Testler işlecinin sol tarafındaki hash_set nesnesini hash_set nesnesini sağ tarafta eşit değildir.

bool operator!=(
   const hash_set <Key, Traits, Allocator>& _Left,
   const hash_set <Key, Traits, Allocator>& _Right
);

Parametreler

  • _Left
    Bir nesne türü hash_set.

  • _Right
    Bir nesne türü hash_set.

Dönüş Değeri

gerçek hash_sets; eşit değilse yanlış hash_sets eşit olması durumunda.

Notlar

Hash_set nesneleri arasında karşılaştırma öğelerini arasında ikili bir karşılaştırma temel alır.Bunlar aynı sayıda öğe varsa ve bunların ilgili öğeleri aynı değerlere sahip iki hash_sets eşit.Aksi halde, bunlar eşit olmayan.

Visual C++ .NET 2003, üyeleri de <hash_map> ve <hash_set> başlık dosyaları artık std ad alanında bulunan, ancak bunun yerine stdext ad alanına taşınmış.Bkz: ad stdext daha fazla bilgi için.

Örnek

// hash_set_op_ne.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>

int main( ) 
{
   using namespace std;
   using namespace stdext;
   hash_set <int> hs1, hs2, hs3;
   int i;

   for ( i = 0 ; i < 3 ; i++ )
   {
      hs1.insert ( i );
      hs2.insert ( i * i );
      hs3.insert ( i );
   }

   if ( hs1 != hs2 )
      cout << "The hash_sets hs1 and hs2 are not equal." << endl;
   else
      cout << "The hash_sets hs1 and hs2 are equal." << endl;

   if ( hs1 != hs3 )
      cout << "The hash_sets hs1 and hs3 are not equal." << endl;
   else
      cout << "The hash_sets hs1 and hs3 are equal." << endl;
}
  
  

Gereksinimler

Başlık: <hash_set>

Ad alanı: stdext

Ayrıca bkz.

Başvuru

Standart Şablon Kütüphanesi