title: If I have a template object in a class, how can I specialize it?
body: <p>I have 2 classes. I want to set class B's variables to something when class A's type T = B and CAP = 30, but i'm not sure how.</p>
  <pre><code>template &lt;typename T, int CAP = 20&gt;
  class A : public B{
  
  T obj {}; // Specialize this
  public:
  
  }
  
  class B {
  string a {};
  string b {};
  }
  
  // When object is type B and CAP is 30 then initialize B variables to something like a = &quot;a is empty&quot; and b = &quot;b is empty&quot;
  // A&lt;B,30&gt; 
  </code></pre>