This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: fixed in output stream not recognized
- From: Martin York <martin dot york at veritas dot com>
- To: 'LLeweLLyn Reese' <llewelly at lifesupport dot shutdown dot com>, John Love-Jensen <eljay at adobe dot com>
- Cc: Frank <fgeck at optonline dot net>, GNU GCC help list <gcc-help at gcc dot gnu dot org>
- Date: Thu, 27 Mar 2003 09:16:09 -0500
- Subject: RE: fixed in output stream not recognized
Have yout tried using STLPort to help?
-----Original Message-----
From: LLeweLLyn Reese [mailto:llewelly at lifesupport dot shutdown dot com]
Sent: 26 March 2003 15:22
To: John Love-Jensen
Cc: Frank; GNU GCC help list
Subject: Re: fixed in output stream not recognized
John Love-Jensen <eljay at adobe dot com> writes:
> Hi Frank,
>
> Worked for me. Hmmm.
Using gcc 2.96 ? I don't think so. It certainly doesn't work on my
gcc 2.96 (i586-mandrake-linux-gnu).
It does work on 3.x, however, as the OP noted - but 2.96 didn't
support it.
>
> #include <iomanip>
> using std::fixed;
>
> #include <fstream>
> using std::ofstream;
>
> #include <string>
> using std::string;
>
> void Foo(const string& filename) {
> double d = 3.3;
> ofstream file(filename.c_str());
> file.precision(0);
> file << fixed << d;
> }
>
> --Eljay