A design question# JobHunting - 待字闺中
k*p
1 楼
Sorry can't type Chinese.
One abstract class has many derived classes in different files. Each time
adding new pure virtual member functions to the abstract class will require
modifying all classes.How to change the hierachy so that only one file needs
to be modified?
Of course, you can put the new function in a file within which the behavior
is determined by object type. Is there more elegant way doing this?
Thanks!
One abstract class has many derived classes in different files. Each time
adding new pure virtual member functions to the abstract class will require
modifying all classes.How to change the hierachy so that only one file needs
to be modified?
Of course, you can put the new function in a file within which the behavior
is determined by object type. Is there more elegant way doing this?
Thanks!