title: Initializing private static variable in class
body: <p>I have a class in header file:</p>
  
  <pre><code>class Employee
      {
          //Private data members
      private:
          string firstName;
          string lastName;
          char gender;
  
          //number of employees
          const static int numEmployees = 0;
  
      public: 
      ....
      };
  </code></pre>
  
  <p><strong>The dumb thing is in "GUIDELINE" from instructor said that declare numEmployees as a static integer value of 0 in private member of class</strong></p>
  
  <p>Problem is I can't update <code>numEmployees</code> variable since it's <code>const</code>, for example when you declare Constructor in public: .. you can not increase <code>numEmployees = numEmployees + 1</code>.</p>
  
  <p>If you don't declare <code>numEmployees</code> as <code>const</code>, just do <code>static int numEmployees;</code> visual studio 2010 give error said that only <code>const</code> will be declared in class.</p>
  
  <p>Any idea how to declare <code>numEmployees</code>? Thank you!</p>