Pointer to file
Posted on 2002-07-30
Hopefully an extremely easy question here, but I can't work it out at all.
I have several functions called (within a single class), all returning values to send out to a file. This is getting quite messy now and I'd like to be able to write the values out from the various functions rather than passing the values back.
I'm currently using ofstream (doing something like):
data = subfunction(several_variables)
fout << data;
I figure I should be able to create a pointer to this and pass that to the functions. Sadly all my attempts at doing this have failed...!