Wednesday, May 21, 2014

Using multiple inheritance in C++


class Animal
{
        //describes the behavior of the animal
}

class Drawing
{
        //contains the drawing properties of the entity like colors, size etc
}


Pitfalls

class A { virtual void f(); };
class B { virtual void f(); };
class C : public A ,public B { void f(); };

No comments:

Post a Comment