#include <iostream>fmtflags flags() const;fmtflags flags(fmtflags f);
The flags( ) function is a member of ios (inherited from ios_base).
The first form of flags( ) simply returns the current format flags settings of the associated stream.
The second form of flags( ) sets all format flags associated with a stream as specified by f. When you use this version, the bit pattern found in f is copied into the format flags associated with the stream. This version also returns the previous settings.
Related functions are unsetf( ) and setf( ).