I want to work with file streams generically. That is, i want to 'program to an interface and not the implementation'. Something like this:
ios * genericFileIO = new ifstream("src.txt"); getline(genericFileIO, someStringObject);//from the string library; dont want to use C strings genericFileIO = new ofstream("dest.txt"); genericFileIO -> operator<<(someStringObject); Is it possible? I am not great with inheritance. Given the io class hierarchy, how do i implement what i want?