title: Should constructor initialize all the data members of the class?
body: <p>I have a situation like this:</p>
  
  <pre><code>class A {
  public:
    A() : n(0) {}
  private:
    int n;
    int m;
  }
  </code></pre>
  
  <p>There is simply no meaning in the application logic to initialize <code>m</code> in the constructor. However, Eclipse warns me that the constructor leaves <code>m</code> uninitialized. I can't run the code somewhere else now. The warning is:</p>
  
  <blockquote>
    <p>Member 'm' was not initialized in this constructor</p>
  </blockquote>
  
  <p>So, does C++ encourage us to initialize all the data members in the constructor or it is just Eclipse's logic? </p>