title: template inheritance c++
body: <p>i am a new programmer in c++. and i am using templates for the first time.</p>
  
  <p>i have an abstract class and another class extending it. but all the protected members of the abstract class are not recognised by the other class:</p>
  
  <p><strong>class0.h:</strong></p>
  
  <pre><code>template&lt;class T&gt;
  class class0 {
  
  protected:
      char p;
  public:
      char getChar();
  };
  
  **class1.h**
  template&lt;class T&gt;
  class class1:public class0&lt;T&gt; {
  public:
      void printChar();
  };
  template&lt;class T&gt;
  void class1&lt;T&gt;::printChar(){
      cout&lt;&lt; p&lt;&lt;endl;//p was not declared in this scope
  }
  </code></pre>
  
  <p>thank you. have a great week =)</p>