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