Take the 2-minute tour ×  I have the following code:  #include
<iostream>  class Grandma     virtual void foo() = 0;  class Mom
: public Grandma{};  class Dad     void foo() { std::cout <<
"dad's foo impl"; }  class Me : public Mom, public Dad{};  int
main()     Me m;  and getting : cannot instantiate abstract
class  I know what this error means, I know I can't instantiate
Grandma because of pure-virtual.  But why can't I instantiate
Me, when compiler knows I am derived from Mom and Dad and Dad
has foo implemented?  I know I can fixed it by adding foo into
Me and inside it call e.g. Dad::foo, but I am afraid it is not
solution for my case.  Is it really necessary to have virtual
method implementation between its declaration and instantiated
object (when traversing "class hierarchy graph")? See ASCI graph
B1  B2   \ |       C1  C2     | /  When I want to instantiate E
and have virtual declaration in A, the only way to make it run
is to define it in A, B2, C1, D or E? and similarly when is
virtual declaration