
7 Dec
2005
7 Dec
'05
5:29 p.m.
On 12/7/05 9:45 AM, "Paul A Bristow" <pbristow@hetp.u-net.com> wrote: Just a side note, but...
void outAsHex(quad_float x) { char fill = cout.fill('0'); int fmtflags = cout.flags(); int precision = cout.precision(2+numeric_limits<quad_float>::digits * 3010/10000); // Save. [SNIP the actual printing] cout.flags(fmtflags); // Restore. cout.fill(fill); cout.precision(precision); }
..we do have RAII classes for I/O state saving & restoring. (Check out the "ROOT/boost/io/ios_state.hpp" header.) -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com