Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

include <fstream>

// write to file:
ofstream o("bla.txt");
double d = 5.5057787190877361e-001;
o << setprecision(15) << fixed << d <<endl;


// read back:
ifstream i("bla.txt");
double d;
i >> d;

include <fstream>

#include <fstream>

// write to file:
ofstream o("bla.txt");
double d = 5.5057787190877361e-001;
o << setprecision(15) << fixed << d <<endl;


// read back:
ifstream i("bla.txt");
double d;
i >> d;