title: cpp default constructor and member initialization list?
body: <pre><code>class test
  {
  public:
      test(int x)
      {
          val = x;
      }
  private:
      int val;
  };
  
  test t(3);
  </code></pre>
  
  <p>I got 2 points about this code.</p>
  
  <ol>
  <li><p><code>test t(3)</code>would call default constructor first, then do <code>val = 3</code></p></li>
  <li><p>if there is at least a user-defined constructor, then the compiler does not generate an implicit default constructor </p></li>
  </ol>
  
  <p>is there a contradiction?</p>