共用方式為


checked_array_iterator::operator!=

測試兩個 checked_array_iterator 是否不相等。

bool operator!=(
   const checked_array_iterator<_Iterator>& _Right
) const;

參數

  • _Right
    checked_array_iterator 檢查的不相等。

備註

如需詳細資訊,請參閱已檢查的迭代器

範例

// checked_array_iterators_opneq.cpp
// compile with: /EHsc
#include <iterator>
#include <iostream> 

using namespace std;
using namespace stdext;

int main() {
   int a[] = {0, 1, 2, 3, 4};
   int b[5];
   copy(a, a + 5, checked_array_iterator<int*>(b,5));
   copy(a, a + 5, checked_array_iterator<int*>(b,5));

   checked_array_iterator<int*> checked_output_iterator(b,5);
   checked_array_iterator<int*> checked_output_iterator2(b,5);

   if (checked_output_iterator2 != checked_output_iterator)
      cout << "checked_array_iterators are not equal" << endl;
   else
      cout << "checked_array_iterators are equal" << endl;

   copy (a, a + 5, checked_output_iterator);
   checked_output_iterator++;

   if (checked_output_iterator2 != checked_output_iterator)
      cout << "checked_array_iterators are not equal" << endl;
   else
      cout << "checked_array_iterators are equal" << endl;
}
  

需求

標頭:<迭代器>

**命名空間:**stdext

請參閱

參考

checked_array_iterator 類別

標準樣板程式庫