inheritance and file I/O
is it ok if i pass a file name to base class constructor to open a text file and then perform operations on that file in the derived class object?
Absolutely. As long as you can access the fstream object in the derived class (if, say, it was protected in the base class).
Topic archived. No new replies allowed.