std::ostreambuf_iterator::ostreambuf_iterator
Aus cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody> ostreambuf_iterator(streambuf_type* buffer) |
(1) | |
ostreambuf_iterator(ostream_type& stream) |
(2) | |
1)
Konstruiert den Iterator mit dem privaten
streambuf_type* Elementgruppe zu buffer und der gescheiterten ()-Bit gesetzt false. Das Verhalten ist undefiniert, wenn buffer ein NULL-Zeiger ist .Original:
Constructs the iterator with the private
streambuf_type* member set to buffer and the failed() bit set to false. The behavior is undefined if buffer is a null pointer.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
Gleich wie
ostreambuf_iterator(stream.rdbuf())Original:
Same as
ostreambuf_iterator(stream.rdbuf())The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Parameter
| stream | - | der Ausgang Strom, dessen RDBUF () wird von dieser Iterator zugegriffen werden
Original: the output stream whose rdbuf() will be accessed by this iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| buffer | - | der Ausgang Strompuffers von diesem Iterator zugegriffen werden
Original: the output stream buffer to be accessed by this iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Ausnahmen
Beispiel
#include <iostream>
#include <fstream>
#include <iterator>
int main()
{
std::basic_filebuf<char> f;
f.open("test.txt", std::ios::out);
std::ostreambuf_iterator<char> out1(&f);
std::ostreambuf_iterator<wchar_t> out2(std::wcout);
*out1 = 'a';
*out2 = L'a';
}