I have a ClassB inherited from ClassA. ClassA has a nested ClassC with a methodA() in it. In this methodA() I need to do things depending on condition if the outer class ClassA or ClassB. What is the best way to construct if/else statement? Thank you.
I have a ClassB inherited from ClassA . ClassA has a nested ClassC with
Share
I would better add some virtual methodB in ClassA and override it in ClassB, and call it in methodA of classC.