operator!=(hash_multiset)
참고
이 API는 사용되지 않습니다.unordered_set 클래스를 대신 사용하는 것이 좋습니다.
Tests if the hash_multiset object on the left side of the operator is not equal to the hash_multiset object on the right side.
bool operator!=(
const hash_multiset <Key, Traits, Allocator>& _Left,
const hash_multiset <Key, Traits, Allocator>& _Right
);
매개 변수
_Left
hash_multiset 형식의 개체입니다._Right
hash_multiset 형식의 개체입니다.
반환 값
true if the hash_multisets are not equal; false if hash_multisets are equal.
설명
The comparison between hash_multiset objects is based on a pairwise comparison between their elements. Two hash_multisets are equal if they have the same number of elements and their respective elements have the same values. 그렇지 않으면 두 개체는 서로 다른 개체입니다.
Visual C++.NET 2003에서, <hash_map> 및 <hash_set> 헤더 파일의 멤버는 더 이상 std 네임스페이스에 존재하지 않습니다. 대신 stdext 네임스페이스로 이동되었습니다. 자세한 내용은 stdext 네임스페이스를 참조하십시오.
예제
// hashset_op_ne.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multiset <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_multisets hs1 and hs2 are not equal." << endl;
else
cout << "The hash_multisets hs1 and hs2 are equal." << endl;
if ( hs1 != hs3 )
cout << "The hash_multisets hs1 and hs3 are not equal." << endl;
else
cout << "The hash_multisets hs1 and hs3 are equal." << endl;
}
요구 사항
헤더: <hash_set>
네임스페이스: stdext