On Jun 5, 4:28 am, Triple-DES <DenPlettf...@gmail.com> wrote:
> On 4 Jun, 17:57, "jason.cipri...@gmail.com" <jason.cipri...@gmail.com>
> wrote:
>
> > Do you happen to know if C++0x is introducing a convenient ostream
> > interface that makes things like:
>
> > printf("%+9.4f %8.3f\n", value1, value2);
>
> > Slightly easier to deal with than:
>
> > cout << showpos << fixed << setw(9) << setprecision(4) << value1 <<
> > noshowpos << setw(
<< setprecision(3) << value2 << endl;
>
> Boost::format provides typesafe, "printf-like" formatting. If I'm not
> mistaken Andrei Alexandrescu also published a similar utility.
Thanks for pointing this out; I messed around with it and have been
using it for a couple of days now. It's really pretty cool. Maybe I'll
start dumping the printf habit after all. Maybe.
Jason