std::ostreambuf_iterator::ostreambuf_iterator
Da cppreference.com.
< cpp | iterator | ostreambuf iterator
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
ostreambuf_iterator(streambuf_type* buffer) | (1) | |
ostreambuf_iterator(ostream_type& stream) | (2) | |
Costruisce l'iteratore con il set di membro privato streambuf_type* a
2) buffer
e il fallito () bit impostato a false. Il comportamento è indefinito se buffer è un puntatore nullo.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.
Come 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.
[modifica]Parametri
stream | - | il flusso di output il cui rdbuf () sarà accessibile da questo iteratore 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 | - | il buffer di flusso di output per essere accessibile da questo iteratore 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. |
[modifica]Eccezioni
[modifica]Esempio
#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';}