ostream_iterator Class
The template class ostream_iterator describes an output iterator object that writes successive elements onto the output stream with the extraction operator <<.
template <
class Type
class CharType = char
class Traits = char_traits<CharType>
>
class ostream_iterator
Parameters
Type
The type of object to be inserted into the output stream.CharType
The type that represents the character type for the ostream_iterator. This argument is optional and the default value is char*.*Traits
The type that represents the character type for the ostream_iterator. This argument is optional and the default value is char_traits<CharType>.
The ostream_iterator class must satisfy the requirements for an output iterator. Algorithms can be written directly to output streams using an ostream_iterator.
Constructors
Constructs an ostream_iterator that is initialized and delimited to write to the output stream. |
Typedefs
A type that provides for the character type of the ostream_iterator. |
|
A type that provides for the stream type of the ostream_iterator. |
|
A type that provides for the character traits type of the ostream_iterator. |
Operators
Dereferencing operator used to implement the output iterator expression *i = x. |
|
A nonfunctional increment operator that returns an ostream_iterator to the same object it addressed before the operation was called. |
|
Assignment operator used to implement the output iterator expression *i = x for writing to an output stream. |
Requirements
Header: <iterator>
Namespace: std