How can I change the precision of printing with the stl?
- by mmr
This might be a repeat, but my google-fu failed to find it.
I want to print numbers to a file using the stl with the number of decimal places, rather than overall precision.
So, if I do this:
int precision = 16;
std::vector<double> thePoint(3);
thePoint[0] = 86.3671436;
thePoint[0] = -334.8866574;
thePoint[0] = 24.2814;
ofstream…