Seems like in some languages, inheritance is not optional if you want to use polymorphism.
AFAIK in C++ you must use inheritance if you want polymorphism since there is no real concept of interfaces.
AFAIK in C++ you must use inheritance if you want polymorphism since there is no real concept of interfaces.
If you want to do things the Java or C# way, then you're correct. You'd want a pure virtual interface, which mimics what you'd get with Java or C#.