- Aug 8, 2003
I'm looking to make a complicated program in C++. It has a header (.h) file. In the header file I have various functions. I want to use ifstream, or fstream, in the header. The main function I use in the header file is: int getData(ostream& out, istream& in). What I want to do is something like this: int getData(ostream& out, istream& in, ifstream& file) so I can read files in the header. Can anyone tell me how to do this successfully? Thanks.