This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/28278] formatted I/O and calliing width(0)
- From: "mikeus at hotmail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Dec 2010 11:25:55 +0000
- Subject: [Bug libstdc++/28278] formatted I/O and calliing width(0)
- Auto-submitted: auto-generated
- References: <bug-28278-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28278
Michael <mikeus at hotmail dot ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikeus at hotmail dot ru
--- Comment #1 from Michael <mikeus at hotmail dot ru> 2010-12-27 11:25:51 UTC ---
Can anybody fix this bug?
------- code: -------
#include<iostream>
using namespace std;
int main()
{
cout.setf(ios_base::fixed);
cout.precision(3);
cout.width(20);
cout.fill('#');
cout << (double)1.123456789 << endl;
cout << (double)0.123456789 << endl;
cout << (double)10.123456789 << endl;
}
---------------------
------- output: -------
###############1.123
0.123
10.123
-----------------------
------- expected: -------
###############1.123
###############0.123
##############10.123
-------------------------
It's just sad... :^(((