I have three different base classes:
class BaseA
{
public:
virtual int foo() = 0;
};
class BaseB
{
public:
virtual int foo() { return 42; }
};
clas
From a polymorphism point of view, prefer A, so you know each child has his own implementation of the virtual function.
Choose B mainly if you have a valid default implementation, but then you have to make sure that all child-classes have their own implementation as needed.
C is not polymorphism, so use judiciously.