title: Co-Dependent .h files with forward declaration
body: <p>I have 3 classes (A, B &amp; C) in different .h files. How can I move the <code>#include</code>s and forward declarations in order for it to compile.</p>
  
  <p>Currently I've used forward declaration in A.h and thought it would work from there. Instead C.h is throwing many compiler errors of <code>'class A' is inaccessible with in this context</code>. </p>
  
  <pre><code>// A.h
  #pragma once
  
  ...
  
  class B;
  
  class A {
    private:
      B *parent_;
  };
  </code></pre>
  
  <pre><code>// B.h
  #pragma once
  
  ...
  
  #include &lt;A.h&gt;
  
  class B : A {
    public:
      virtual void func(A *arg);
  };
  </code></pre>
  
  <pre><code>// C.h
  #pragma once
  
  ...
  
  #include &lt;A.h&gt;
  #include &lt;B.h&gt;
  
  class C : B {
    public:
      virtual void func(A *arg);
  
    private:
      A *left_child;
      A *right_child;
  };
  </code></pre>