title: What is the meaning of double curly braces initializing a C-struct?
body: <p>I'm currently working with legacy <em>C++</em> code, successfully compiled with gcc 2.9.X.<br>
  I've been asked to port this legacy code to gcc 3.4.X. Most of the errors were easily corrected, but this particular one puzzles me.</p>
  
  <p>The context :  </p>
  
  <pre><code> struct TMessage 
     {
      THeader header;
      TData data;
     };
  
   struct THeader
     {
      TEnum myEnum;
      TBool validity;
     };
  </code></pre>
  
  <p>What was done :</p>
  
  <pre><code> const TMessage init = {{0}};
  
   /* Later in the code ... */
   TMessage message = init;
  </code></pre>
  
  <p><strong>My question(s)</strong> :<br>
  What is the meaning of the {{}} operator ?  Does it initialize the first field (the <em>header</em>) to a binary 0 ? Does it initialize the first field of the first structure (the <em>enum</em>) to (literal) 0 ?</p>
  
  <p>The 3.4.6 error I get is <code>invalid conversion from 'int' to 'TEnum'</code>, either with one or two pairs of curly brackets.  </p>
  
  <p>How can I set my structure to a bunch of 0's without using memset ?</p>
  
  <p>Thanks in advance. </p>