operator!= (multiset)
Zkoušky, pokud Multimnožinové objekt na levé straně operátoru není rovno Multimnožinové objekt na pravé straně.
bool operator!=(
const multiset <Key, Traits, Allocator>& _Left,
const multiset <Key, Traits, Allocator>& _Right
);
Parametry
_Left
Objekt typu multiset._Right
Objekt typu multiset.
Vrácená hodnota
True Pokud sady nebo multisets není stejný; FALSE Jestliže shodné množiny nebo multisets.
Poznámky
Srovnání Multimnožinové objektů je založena na párový srovnání jejich prvků.Dvě sady nebo multisets jsou stejné, pokud mají stejný počet prvků a jejich příslušné prvky mají stejné hodnoty.Jinak nerovné.
Příklad
// 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;
}
Požadavky
Záhlaví: <set>
Obor názvů: std