http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28278
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-27
14:31:39 UTC ---
(In reply to comment #1)
> Can anybody fix this bug?
Don't be sad, your bug is easy to fix:
> ------- code: -------
> #include<iostream>
> using namespace std;
>
> int main()
> {
> cout.setf(ios_base::fixed);
> cout.precision(3);
> cout.width(20);
> cout.fill('#');
>
cout << std::setw(20) << 1.123456789 << endl;
cout << std::setw(20) << 0.123456789 << endl;
cout << std::setw(20) << 10.123456789 << endl;
> }
Fixed.