title: How can I do that? Classes call functions from each others (include-forward anomaly)
body: <p>I would like to call the Foo() function from class A through the other class's pointer
  (I cannot include the other class's header, cause I do that on the other class, so it would result a ,,contains itself'' error)</p>
  
  <pre><code>//a.h
  
  
  class X; // here I can't include "x.h", so forward declaration, but that results incomplete type
  
  class A
  {
   X* ptr;
  
   void Example()
   {
    X-&gt;Foo();    // it can't be use, casue ,,incomplete type is not allowed''
   }
  
  
   void Print();
  }
  </code></pre>
  
  <hr>
  
  <pre><code>//x.h
  #include "a.h"
  
  class X
  {
   A* ptrarray[];
  
   void Foo();
  
   void List()
   {
    for (i...)
      ptrarray[i]-&gt;Print();  // ok, works fine
   }
  }
  </code></pre>
  
  <p>How can I get around this problem, can you give me any advice?</p>