title: C++ override a member variable
body: <p>This may be a silly question, but I was wondering if it is possible to override the type of a member variable as long as it is a child type.</p>
  
  <p>Basically I have a parent class A that has a variable like so:</p>
  
  <pre><code>TSubclassOf&lt;AItem&gt; ItemClass;
  </code></pre>
  
  <p>then in class B which extends class A I was wondering if I could change the type to a different one like so:</p>
  
  <pre><code>TSubclassOf&lt;AWeapon&gt; ItemClass;
  </code></pre>
  
  <p>where Weapon extends Item, so it is still a subclass of Item.</p>
  
  <p>Is this possible?</p>
  
  <p>If not, is it possible to hide a variable in a child class? i.e. I could hide ItemClass and create a new variable called WeaponClass.</p>
  
  <p>Thanks in advance for the help</p>