Inheritance from two abstract classes
<p>I have a problem that I have not yet tested/compiled and wondering if it is possible and if it is bad design?</p>

<p>My Problem:</p>

<p>I want to have an abstract base class A and a abstract derived class B.</p>

<p>I realize if this is possible I will have a number of pure virtual member functions in each class and also I will not be able to initialize these objects, but that is a given for abstract classes.</p>

<p>In my design I will have another derived class C which I would then initialize - class C would be derived from class B.</p>

<p>I would have something that looked like this</p>

<pre><code>class C
  ^
  |
abstract class B
  ^
  |
abstract base class A
</code></pre>

<p>My Question:</p>

<p>Is this possible first of all? I would suspect so, but not declaring the pure virtual functions in A in class B may be troublesome?</p>

<p>e.x.</p>

<pre><code>class A {
  public:
    virtual void test()=0;
 };

class B: public A {
  public:
   virtual void test()=0;
   virtual void anotherTest()=0;
 };
</code></pre>

<p>Is the above okay?</p>

<p>Is this bad c++ design? In future I will have derived classes from A so it would be nice to have this design.</p>
