title: Are static fields inherited?
body: <p>When static members are inherited, are they static for the entire hierarchy, or just that class, i.e.:</p>
  
  <pre><code>class SomeClass
  {
  public:
      SomeClass(){total++;}
      static int total;
  };
  
  class SomeDerivedClass: public SomeClass
  {
  public:
      SomeDerivedClass(){total++;}
  };
  
  int main()
  {
      SomeClass A;
      SomeClass B;
      SomeDerivedClass C;
      return 0;
  }
  </code></pre>
  
  <p>would total be 3 in all three instances, or would it be 2 for <code>SomeClass</code> and 1 for <code>SomeDerivedClass</code>?</p>