ostreambuf_iterator::operator*
출력 반복기 식을 구현 하는 데 사용 되는 작동 하지 않는 역참조 연산자 *i = x.
ostreambuf_iterator<CharType, Traits>& operator*( );
반환 값
Ostreambuf 반복기 개체입니다.
설명
이 연산자 함수 출력 반복기 식에서 *i = x 출력 문자 스트림 버퍼에.Ostreambuf 반복기를 적용 하 고 반복기를 반환 합니다. * 반복 계산 반환 반복 계산,
예제
// ostreambuf_iterator_op_deref.cpp
// compile with: /EHsc
#include <iterator>
#include <vector>
#include <iostream>
int main( )
{
using namespace std;
// ostreambuf_iterator for stream cout
// with new line delimiter
ostreambuf_iterator<char> charOutBuf ( cout );
// Standard iterator interface for writing
// elements to the output stream
cout << "Elements written to output stream:" << endl;
*charOutBuf = 'O';
charOutBuf++; // no effect on iterator position
*charOutBuf = 'U';
*charOutBuf = 'T';
}
요구 사항
헤더: <iterator>
네임 스페이스: std