Inheriting and overriding ostream operator in C++
问题 I've been trying to find an answer to this, but no one seems to have exactly the same problem as I do. I am working with several derived classes. The ostream operator << for each of these should print out some things common to each, and some things specific to each. Later on, I would like to further derive from these derived classes, and again the new derived classes need to print out some things that are in the "generations" above them. For example: The Base class .h file class Base { int