im asked to create a class and have it be publicly inherited by the string class. The way I have thought about this is that because my new class will inherit all protected and public members of the string class, any object I create will essentially be a string. If that's incorrect, please tell me what is right.
Assuming Im right though, I should be able to do this:
1 2 3
newClass object = "Hello";
cout << object;
If I have to overload the ofstream operator, thats fine I can do that. But Im more concerned about what I said at the top. If I'm wrong, I would like to know just how to make that small segment of code work. Thank you