std::basic_streambuf::~basic_streambuf
Da cppreference.com.
< cpp | io | basic streambuf
![]() |
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. |
virtual ~basic_streambuf(); |
||
Questa distruzione è vuota: i membri di questo
basic_streambuf
(i puntatori e le impostazioni internazionali) sono distrutti secondo la normale sequenza distruzione dell'oggetto dopo questo ritorno distruttore. Tuttavia, dal momento che è dichiarato pubblico virtuale, permette gli oggetti che sono derivati da std::basic_streambuf
da eliminare attraverso un puntatore alla classe base.Original:
This destruction is empty: the members of this
basic_streambuf
(the pointers and the locale) are destructed in accordance with the usual object destruction sequence after this destructor returns. However, since it is declared public virtual, it allows the objects that are derived from std::basic_streambuf
to be deleted through a pointer to base class.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
(Nessuno)
Original:
(none)
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] Esempio
#include <iostream> #include <fstream> int main() { std::filebuf* fbp = new std::filebuf; fbp->open("test.txt", std::ios_base::out); fbp->sputn("Hello\n", 6); std::streambuf* sbp = fbp; delete sbp; // the file is closed, output flushed and written std::ifstream f("test.txt"); std::cout << f.rdbuf(); // proof }
Output:
Hello
[modifica] Vedi anche
costruisce un oggetto basic_streambuf Original: constructs a basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protetto funzione membro) |