Using a macro for fstream file input as part of a class
- by vette982
I have a class that processes a file, and as part of the constructor with one argument I want to input a file using fstream.
I basically want it do something like this
class someClass{
public:
someClass(char * FILENAME)
{
fstream fileToProcess;
fileToProcess.open(<FILENAME>, fstream::in | fstream::out | fstream::app);
}
};
I want to pass the filename in as an argument to the class constructor, and then the class someClass will access it with fstream.