title: C++ template method forward declaration
body: <p>I'm having a little problem with my classes. I have two classes which both use template methods, therefore I have to put it in the header. Here is an example. I'd like it to compile properly without the "forward declaration incomplete" problem. I understand what is wrong but I can't figure how to correct this. Thank you guys.</p>
  
  <p>class.h</p>
  
  <pre><code>    class A;
      class B;
  
      class A
      {
          B *foo;
  
          template &lt;class T&gt;
          void func()
          {
              foo-&gt;fanc();   
          }
      }
  
      class B
      {
         A *foo;
  
         void fanc();
  
         template &lt;class T&gt;
         void osef()
         {
              foo-&gt;func&lt;int&gt;();
         }
      }
  </code></pre>