Output to text file

Would this work to set the precision of output to a text file to 10 decimal places?


cout.precision(10);
cout.setf(ios::fixed,ios::floatfield);

Current output looks like this....
-1.7873e+07 , -1.94927e+07 , 2.90333e+06 , 2.42024e+07 ,
ohhhhhhhhhhhh i figured it out


ofstream calculated;
calculated.open ("Calculated.csv");


Change cout to calculated...!!!
Topic archived. No new replies allowed.