| 
iostream hierarchy unitbuf / nounitbuf  | 
| cplusplus.com | 
 Set/Unset unitbuf format flag 
 
unitbuf sets the format flag to flush the output buffer after each insertion operation.
 
noskipws unsets this flag.
Parameters.
 Return Value.
 
A reference to the stream object.
 Example.
// modify unitbuf flag
#include <fstream>
using namespace std;
int main () {
  ofstream outfile ("test.txt");
  outfile << unitbuf <<  "Test " << "file" << endl;
  outfile << nounitbuf;
  outfile.close();
  return 0;
}
 See also.
 
flags,
setf,
unsetf
 
ios_base class