GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::ostream_iterator::operator=(3) C++ Standard Libary std::ostream_iterator::operator=(3)

std::ostream_iterator::operator= - std::ostream_iterator::operator=


ostream_iterator& operator=( const T& value );


Inserts value into the associated stream, then inserts the delimiter, if one was
specified at construction time.


If out_stream is a pointer to the associated std::basic_ostream and delim is the
delimiter specified at the construction of this object, then the effect is
equivalent to


*out_stream << value;
if(delim != 0)
*out_stream << delim;
return *this;


value - the object to insert


*this


T can be any class with a user-defined operator<<

// Run this code


#include <iostream>
#include <iterator>


int main()
{
std::ostream_iterator<int> i1(std::cout, ", ");
*i1++ = 1; // usual form, used by standard algorithms
*++i1 = 2;
i1 = 3; // neither * nor ++ are necessary
std::ostream_iterator<double> i2(std::cout);
i2 = 3.14;
}


1, 2, 3, 3.14

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.