title: c++ templates and inner classes
body: <p>Can someone please clarify inner class use with templates?  I have searched through books and internet examples to learn templates but few examples show inner class usage.  What I gathered so far is</p>
  
  <pre><code>template &lt;class T&gt;
  class A
  {
       class B
       {
           B()
           ~B()
       }
  
       A();
       ~A();
  
      B* a(T i, B* l);
  }
  </code></pre>
  
  <p>From reading <a href="https://stackoverflow.com/questions/1694063/templates-and-nested-classes-structures">this</a> and <a href="https://stackoverflow.com/questions/4092237/c-nested-class-of-a-template-class">this</a> I believe I should define outer class constructor as </p>
  
  <pre><code>template &lt;class T&gt;
  class A&lt;T&gt;::A()
  {
  
  }
  </code></pre>
  
  <p>but how am I defining the inner class constructor definition? How do I define the definition of a? I have struggled with this for most of the day trying to figure this out and really appreciate assistance.</p>