Compartir a través de


basic_ostream::flush

Vacía el búfer.

basic_ostream<_Elem, _Tr>& flush( );

Valor devuelto

Una referencia al objeto de basic_ostream.

Comentarios

Si rdbuf no es un puntero NULL, la función rdbuf->pubsync. Si ese devuelve -1, la función setstate(badbit). Devuelve *this.

Ejemplo

// basic_ostream_flush.cpp
// compile with: /EHsc
#include <iostream>

int main( ) 
{
   using namespace std;
   cout << "test";
   cout.flush();
}
  

Requisitos

ostream <deEncabezado: >

Espacio de nombres: std

Vea también

Referencia

basic_ostream (Clase)

Programación con iostream

Convenciones de iostreams