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: John Love-Jensen <eljay at adobe dot com>
- To: Frank <fgeck at optonline dot net>, GNU GCC help list <gcc-help at gcc dot gnu dot org>
- Date: Wed, 26 Mar 2003 14:15:05 -0600
- Subject: Re: fixed in output stream not recognized
Hi Frank,
Worked for me. Hmmm.
#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