다음을 통해 공유


checked_array_iterator::operator+

반복기에 오프셋을 추가하고 새로운 오프셋 위치에서 삽입된 요소의 주소를 지정하는 새로운 checked_array_iterator 을 반환합니다.

checked_array_iterator<_Iterator> operator+(
   difference_type _Off
) const;

매개 변수

  • _Off
    The offset to be added to the checked_array_iterator.

반환 값

A checked_array_iterator addressing the offset element.

설명

자세한 내용은 Checked Iterators을 참조하십시오.

예제

// checked_array_iterators_op_plus.cpp
// compile with: /EHsc
#include <vector>
#include <iostream>

int main() {
   using namespace stdext;
   using namespace std;
   int a[] = {6, 3, 77, 199, 222};
   int b[5];
   copy(a, a + 5, checked_array_iterator<int*>(b,5));

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

   cout << *checked_output_iterator << endl;
   checked_output_iterator = checked_output_iterator + 3;
   cout << *checked_output_iterator << endl;
}
  

요구 사항

헤더: <iterator>

네임스페이스: stdext

참고 항목

참조

checked_array_iterator 클래스

표준 템플릿 라이브러리