3 ms·
> I don't know of a different motive for inheritance. Code reuse? You have a base class that does a bunch of stuff, and you want to add a single thing. If the
by bheadmaster 3y ago
> I don't know of a different motive for inheritance.
Code reuse? You have a base class that does a bunch of stuff, and you want to add a single thing.
If there wasn't any motive for inheritance without polymorphism, then all methods in C++ would be virtual, wouldn't they?