I am having trouble setting the output format while using a pointer to a Filestream:
struct statLine{
int id;
int primary_type;
int secondary_type;
double period;
double epochnumber;
int savedextremenumber;
}statLine;
void printStatLine(ofstream *FSOptr)
{
FSOptr->precision(7);
*FSOptr << statLine.id << " " << statLine.primary_type << " " <<statLine.secondary_type << " ";
*FSOptr << statLine.period << " ";
*FSOptr << statLine.epochnumber << " " << statLine.savedextremenumber << endl;
}
The printing works ok, but I can't seem to make the formatting (precision(7)) stick. Any suggestions?