* Mark Hellegers <M.H.Hellegers@stud.tue.nl>
| According to the man page for fstream, there should be some
| functions to do this. If I read it correctly there should be an
| attach function and the constructor to do this, but this doesn't
| work. The compiler says they don't exist and the fstream header
| indeed does not have these functions.

IIUC iostream::attach is no longer in the C++ Standard.
This works for me w/o attach: