ostream_iterator::char_type
반복기의 문자 형식에 대해 제공 하는 형식입니다.
typedef CharType char_type;
설명
템플릿 매개 변수에 대 한 동의어입니다 CharType.
예제
// ostream_iterator_char_type.cpp
// compile with: /EHsc
#include <iterator>
#include <vector>
#include <iostream>
int main( )
{
using namespace std;
typedef ostream_iterator<int>::char_type CHT1;
typedef ostream_iterator<int>::traits_type CHTR1;
// ostream_iterator for stream cout
// with new line delimiter:
ostream_iterator<int, CHT1, CHTR1> intOut ( cout , "\n" );
// Standard iterator interface for writing
// elements to the output stream:
cout << "The integers written to the output stream\n"
<< "by intOut are:" << endl;
*intOut = 10;
*intOut = 20;
*intOut = 30;
}
요구 사항
헤더: <iterator>
네임 스페이스: std