The unitbuf() method of stream manipulators in C++ is used to set the unitbuf format flag for the specified str stream. This flag flushes the associated buffer after each operation.
ios_base& unitbuf (ios_base& str)
Parameters: This method accepts str as a parameter which is the stream for which the format flag is affected.
Return Value: This method returns the stream str with unitbuf format flag set.
unitbuf flag: G F G
unitbuf flag: G E E K S
Rated as one of the most sought after skills in the industry, own the basics of coding with our C++ STL Course and master the very concepts by intense problem-solving.