operator== (multiset)
Sınamaları multiset işlecinin sol tarafındaki sağ tarafındaki multiset nesneye eşit nesnesidir.
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 ; işlecinin sağ tarafındaki multiset işlecinin sol tarafındaki multiset eşitse Aksi halde yanlış.
Notlar
Multiset nesneler arasında karşılaştırma öðelerinin yapılandırdı Karşılaştırmasında esas alı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_eq.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 equal." << endl;
else
cout << "The multisets s1 and s2 are not equal." << endl;
if ( s1 == s3 )
cout << "The multisets s1 and s3 are equal." << endl;
else
cout << "The multisets s1 and s3 are not equal." << endl;
}
Gereksinimler
Başlık: <set>
Namespace: std