When writing to a stream, setting the justification property (e.g., right and left) continues until it is changed.
If you are writing a logger, it is programmatically polite to first save the ios flags with a statement like:
ios::fmtflags flags = cout.flag(); // Save the flags.
// Change cout flags the way you want.
cout.flags(flags); // Restore the flags.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment