title: Overwriting a variable when inheriting from a parent class
body: <p>I have a simple class</p>
  
  <pre><code>class Foo {
      public:
          float m;
          Foo();
  }
  
  Foo::Foo(){
      this-&gt;m = 1.0f;
  }
  </code></pre>
  
  <p>Then I'm extending it with</p>
  
  <pre><code>class Bar: public Foo {
      public:
          float m;
          Bar()
  }
  
  Bar::Bar(){
      this-&gt;m = 10.0f;
  }
  </code></pre>
  
  <p>I then instantiate <code>Bar()</code> but <code>Bar.m</code> is still 1.0f. Is there a reason for this?</p>