title: memset() or value initialization to zero out a struct?
body: <p>In Win32 API programming it's typical to use C <code>struct</code>s with multiple fields. Usually only a couple of them have meaningful values and all others have to be zeroed out. This can be achieved in either of the two ways:</p>
  
  <pre><code>STRUCT theStruct;
  memset( &amp;theStruct, 0, sizeof( STRUCT ) );
  </code></pre>
  
  <p>or</p>
  
  <pre><code>STRUCT theStruct = {};
  </code></pre>
  
  <p>The second variant looks cleaner - it's a one-liner, it doesn't have any parameters that could be mistyped and lead to an error being planted.</p>
  
  <p>Does it have any drawbacks compared to the first variant? Which variant to use and why?</p>