Why inheritance requires virtual functions? I read this from a book :

Because inheritance generally requires the use of one or more virtual
functions (a virtual destructor if nothing else), you don't want any hierarchy for small,
heavily used objects.

Thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.