std::ostream_iterator<T,CharT,Traits>::ostream_iterator (3) - Linux Manuals
std::ostream_iterator<T,CharT,Traits>::ostream_iterator: std::ostream_iterator<T,CharT,Traits>::ostream_iterator
Command to display std::ostream_iterator<T,CharT,Traits>::ostream_iterator
manual in Linux: $ man 3 std::ostream_iterator<T,CharT,Traits>::ostream_iterator
NAME
std::ostream_iterator<T,CharT,Traits>::ostream_iterator - std::ostream_iterator<T,CharT,Traits>::ostream_iterator
Synopsis
ostream_iterator(ostream_type& stream, const CharT* delim) (1)
ostream_iterator(ostream_type& stream) (2)
1) Constructs the iterator with stream as the associated stream and delim as the delimiter.
2) Constructs the iterator with stream as the associated stream and a null pointer as the delimiter.
Parameters
stream - the output stream to be accessed by this iterator
delim - the null-terminated character string to be inserted into the stream after each output
Example
// Run this code
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
std::ostream_iterator<int> i1(std::cout, ", ");
std::fill_n(i1, 5, -1);
std::ostream_iterator<double> i2(std::cout);
*i2++ = 3.14;
}
Output:
-1, -1, -1, -1, -1, 3.14
Pages related to std::ostream_iterator<T,CharT,Traits>::ostream_iterator
- std::ostream_iterator<T,CharT,Traits>::operator++ (3) - std::ostream_iterator<T,CharT,Traits>::operator++
- std::ostream_iterator<T,CharT,Traits>::operator= (3) - std::ostream_iterator<T,CharT,Traits>::operator=
- std::ostream_iterator<T,CharT,Traits>::~ostream_iterator (3) - std::ostream_iterator<T,CharT,Traits>::~ostream_iterator
- std::ostream_iterator (3) - std::ostream_iterator
- std::ostream (3) - std::basic_ostream
- std::ostreambuf_iterator (3) - std::ostreambuf_iterator
- std::ostreambuf_iterator<CharT,Traits>::failed (3) - std::ostreambuf_iterator<CharT,Traits>::failed
- std::ostreambuf_iterator<CharT,Traits>::operator++ (3) - std::ostreambuf_iterator<CharT,Traits>::operator++
- std::ostreambuf_iterator<CharT,Traits>::operator= (3) - std::ostreambuf_iterator<CharT,Traits>::operator=
- std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator (3) - std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator
- std::ostringstream (3) - std::basic_ostringstream
- std::ostringstream::operator= (3) - std::basic_ostringstream::operator=
- std::ostringstream::rdbuf (3) - std::basic_ostringstream::rdbuf