Would anyone be able to help me with the following problem. I am trying to create a generic function, which accepts a stream name and the file name to open. The function output an error if it can't open the file. I've written some sample code to try and illustrate what I mean. Any ideas would be v.greatful thanks.
const int MAX_BUFFER=256;
void OpenFile(ifstream InFile, char FileName[MAX_BUFFER]);
void OpenFile(ifstream InFile, char FileName[MAX_BUFFER])
cout << "\nCould not open file.";