I\'m currently using std::ofstream as follows:
std::ofstream outFile;
outFile.open(output_file);
Then I attempt to pass a st
I'd rather write ss.str(); instead of ss.rdbuf(); (and use a stringstream).
If you use ss.rdbuf() the format-flags of outFile will be reset rendering your code non-reusable.
I.e., the caller of GetHolesResults(..., std::ofstream &outFile) might want to write something like this to display the result in a table:
outFile << std::setw(12) << GetHolesResults ...
...and wonder why the width is ignored.