Categories
C++ OOP work with classes!?
class b{ public: void shw(){ a::show(); } }; class a: public b{ public: int q,w; a(){q=10;w=15;} void show(){ } };
Answer the question
In order to leave comments, you need to log in
The base class should not know who inherits from it, so your option is wrong. Maybe virtual functions are suitable for you, google how they work.
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question