Initializing the first element in a struct
<p>I do a lot of Win32 programming in C++ and many Win32 structures have a 'size' (often called <code>cbSize</code> or <code>length</code>) member as the first element which needs to be set before the relevant API call can be made.  For example:</p>

<pre><code>WINDOWPLACEMENT wp;
wp.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(hWnd, &amp;wp);
</code></pre>

<p>Now, I think it is good practice to initialize structure members to zero which I can do with:</p>

<pre><code>WINDOWPLACEMENT wp = { };
</code></pre>

<p>or</p>

<pre><code>WINDOWPLACEMENT wp = { 0 };
</code></pre>

<p>However, what happens to the other members of the struct if I initialize the first member like this:</p>

<pre><code>WINDOWPLACEMENT wp = { sizeof(WINDOWPLACEMENT) };
</code></pre>

<p>Are they automatically initialized to zero?  Or does it depend on which compiler I'm using and whether it's a debug build or not?</p>
