title: setting datamembers when implementing an abstract class
body: <p>So, I have an abstract class A, which I implement in B.</p>
  
  <p>B uses C, and A cannot depend on C. so how do I set it?</p>
  
  <p>I dont want to use a dynamic cast and add a setter to B.</p>
  
  <pre><code>class A
  {
  public:
      virtual void doSomething() const = 0;
  }
  
  
  class C
  {}
  
  class B
  {
  public:
      virtual void doSomething() const { mVar; }  
  private:
      C mVar;
  }
  </code></pre>