I'm currently using a std::ofstream a function and a std::stringstream
std::ofstream outFile;
outFile.open(output_file);
Then I call a function
GetHolesResults(..., std::ofstream &outFile){
float x = 1234;
std::stringstream ss;
ss << x << std::endl;
outFile << ss;
}
Now my outFile contains nothing but garbage "0012E708" repeated all over in GetHolesResults I can write
outFile << "Foo" << std:endl;
and it will output correctly in the outFile
Any suggestion on what I'm doing wrong?