다음을 통해 공유


basic_ostream::flush

Flushes the buffer.

basic_ostream<_Elem, _Tr>& flush( );

반환 값

A reference to the basic_ostream object.

설명

If rdbuf is not a null pointer, the function calls rdbuf->pubsync. If that returns -1, the function calls setstate(badbit). It returns *this.

예제

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

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

요구 사항

Header: <ostream>

네임스페이스: std

참고 항목

참조

basic_ostream 클래스

iostream 프로그래밍

iostreams 규칙