operator!= (<deque>)
演算子の左側の deque のオブジェクトが右側のオブジェクトと等しくない deque のテスト。
bool operator!=(
const deque<Type, Allocator>& _Left,
const deque<Type, Allocator>& _Right
);
パラメーター
_Left
deque 型のオブジェクト。_Right
deque 型のオブジェクト。
戻り値
deque のオブジェクトがではないtrue ; deque のオブジェクトが等しい false。
解説
deque のオブジェクトの比較は、要素のペアに比較に基づいています。2 個の deque のオブジェクトは、要素の数が同じで、対応する要素の値が同じ同じです。それ以外の場合は等しくありません。
使用例
// deque_op_ne.cpp
// compile with: /EHsc
#include <deque>
#include <iostream>
int main( )
{
using namespace std;
deque <int> c1, c2;
c1.push_back( 1 );
c2.push_back( 2 );
if ( c1 != c2 )
cout << "The deques are not equal." << endl;
else
cout << "The deques are equal." << endl;
}
必要条件
ヘッダー: <deque>
名前空間: std