title: Are members of a built-in type ever default-initialised?
body: <p>I recently ran into a problem with one of my classes because I hadn't set a pointer to NULL in my constructor initialiser list and so it contained rubbish when I ran the program. </p>
  
  <p>However, whilst I know that instances of a built-in type declared on the stack but not initialised will contain random values, I was pretty sure I'd read somewhere that as class members not placed explicitly in the constructor initialiser list would have their default constructors called, for built-in types this would occur too, inserting code like a pseudo-constructor that will on most platforms, set them to zero I also thought I'd read in 'Thinking in C++' somewhere that under certain circumstances before an object is constructed its memory will be zeroed-out, however I appear to be wrong on both occasions.</p>
  
  <p>Please could anyone confirm for me,
  <br>  a) Does initialisation of members of a built-in type have anything to do with whether a user-defined constructor is defined or not,
  <br>  b) do members of a built-in type always need to be initialised manually, and
  <br>  c) are there any circumstances under which an object's storage is zeroed-out before the constructor is called?</p>
  
  <p>Also, in researching this, I have seen the terms 'default-initialised' and 'zero-initialised' used - is there a difference between saying:</p>
  
  <pre><code>T a;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>T a();
  </code></pre>
  
  <p>? I thought that the first form was just used to prevent ambiguity when the second may be taken by the compiler as a function declaration.</p>
  
  <p>Thank you very much for your time,</p>
  
  <p>stellarpower</p>