Sdílet prostřednictvím


ostream_iterator::char_type

Typ, který poskytuje pro typ znak iterace.

typedef CharType char_type;

Poznámky

Typ je synonymum pro parametr šablony CharType.

Příklad

// 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;
}
  

Požadavky

Záhlaví: <iterator>

Obor názvů: std

Viz také

Referenční dokumentace

ostream_iterator Class

Standardní šablona knihovny