std::basic_istream::~basic_istream
De cppreference.com
|
|
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
virtual ~basic_istream();
|
||
Destruye la corriente de entrada .
Original:
Destructs the input stream.
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.
Notas
Este destructor no lleva a cabo ninguna operación en la streambuffer subyacente (
rdbuf()): los destructores de los flujos de entrada derivados como std::basic_ifstream y std::basic_istringstream son responsables de llamar a los destructores de los streambuffers .Original:
This destructor does not perform any operation on the underlying streambuffer (
rdbuf()): the destructors of the derived input streams such as std::basic_ifstream and std::basic_istringstream are responsible for calling the destructors of the streambuffers.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.
Ejemplo
Ejecuta este código
#include <sstream>
#include <iostream>
void print_stringbuf(std::streambuf* p)
{
std::istream buf(p); // buf shares the buffer with s1
int n;
buf >> n;
std::cout << n;
} // calls the destructor of buf. p remains unaffected
int main()
{
std::istringstream s1("10 20");
print_stringbuf(s1.rdbuf());
int n;
s1 >> n;
std::cout << ',' << n << '\n';
}
Salida:
10,20