Namensräume
Varianten
Aktionen

std::ostream_iterator::operator=

Aus cppreference.com

 
 
Iterator Bibliothek
Iterator Primitiven
Original:
Iterator primitives
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iterator_traits
input_iterator_tag
output_iterator_tag
forward_iterator_tag
bidirectional_iterator_tag
random_access_iterator_tag
iterator
Iterator Adaptern
Original:
Iterator adaptors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reverse_iterator
Stream-Iteratoren
Original:
Stream iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istream_iterator
ostream_iterator
istreambuf_iterator
ostreambuf_iterator
Iterator Operationen
Original:
Iterator operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
advance
distance
prev(C++11)
next(C++11)
Reichen Zugang
Original:
Range access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
begin(C++11)
end(C++11)
 
std::ostream_iterator
Member-Funktionen
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ostream_iterator::ostream_iterator
ostream_iterator::~ostream_iterator
ostream_iterator::operator=
ostream_iterator::operator*
ostream_iterator::operator++
ostream_iterator::operator++(int)
 
ostream_iterator& operator=( const T& value )
Fügt value in den zugehörigen Strom, fügt dann das Trennzeichen, wenn man bei Bauzeit angegeben .
Original:
Inserts value into the associated stream, then inserts the delimiter, if one was specified at construction time.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Wenn out_stream die privaten Member Zeiger auf die zugehörige ist std::basic_ostream und delim wird der Zeiger auf das erste Zeichen im Trennzeichen, ist der Effekt entspricht
Original:
If out_stream is the private member pointer to the associated std::basic_ostream and delim is the pointer to the first character in the delimiter, the effect is equivalent to
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

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

Inhaltsverzeichnis

[Bearbeiten] Parameter

value -
das Objekt einzufügen
Original:
the object to insert
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Rückgabewert

*this

[Bearbeiten] Notes

T kann jede Klasse mit einem benutzerdefinierten operator << sein
Original:
T can be any class with a user-defined operator<<
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Beispiel

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

Output:

1, 2, 3, 3.14