I do not know any method to clear all flags, but you can use cout.unsetf( flags_here ) to remove some specific flags. The precision I donīt know, you could reset it to the default, I think that it is 5.
Hope that helps!
skipws, Skip whitespace on input.
left, Left-adjust output.
right, Right-adjust output.
internal, Pad after sign or base indicator.
dec, Decimal conversion.
oct, Octal conversion.
hex, Hexadecimal conversion.
showbase, Show base indicator on output.
showpoint, Show decimal point for floating-point output.
uppercase, Uppercase hex output.
showpos, Show '+' with positive integers.
scientific, Suffix floating-point numbers with exponential (E) notation on output.
fixed, Use fixed decimal point for floating-point numbers.
unitbuf, Flush all streams after insertion.
stdio, Flush stdout, stderr after insertion.