I cannot find an answer for how I might use an already opened fstream to output formatted doubles to a text file. Currently my code is doing this:
int writeT
Try using
#include <iomanip> // std::setprecision()
f << fixed << setprecision(2) << endl;
set precision sets the number of significant digits, not the number of decimals places. For example
cout << setprecision(3) << 12.3456 << endl;
would output 12.3
Sending in fixed first makes it so you are setting the precision from a fixed position (the decimal place) rather than from the first digit of the floating point value.