noone wrote:
Something I've noticed has me annoyed.
consider this
ostream o;
o << scientific << setw(15) << setprecision(5) << right <<
a << b << c << endl;
on some platforms a, b, and c are all formatted according to the field
widths specified and other times (a) is the only variable that
maintains the requested justification and field width.
I can understand something like
o << scientific << setw(15) << setprecision(5) << right << a;
o << b << c << endl;
throwing out the field information but I'm not seeing any consistency
across applications.
Aren't manipulators suppose to be persistent until overridden,
especially in one statement as in my first example?
I couldn't find any wording in the Standard to support this, but in
Josuttis' "The C++ Standard Library" he mentions that manipulators
with values (like setw or setprecision) only affect the next output
operation. The other type (right, scientific) are flag type manips
and they should stick, IIUIC.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask