title: C Programming: Initialize Array of Unions
body: <p>I have a union defined as:</p>
  
  <pre><code>typedef union{
      unsigned b_a: 1;
      unsigned b_b:1;
      unsigned b_c:1;
      int d_e;
      int option;
  
      int data[7];
  }myUnion;
  </code></pre>
  
  <p>and I would like to declare and initialize an array of type myUnion:</p>
  
  <pre><code>myUnion myUnionArray[1] = { {.b_a=0, .b_b=0, .b_c=0, .d_e=5, .option=6} }
  </code></pre>
  
  <p>I've tried the above line to initialize the array but I keep get errors when compiling ("too many initializers").</p>
  
  <p>Any idea what I am doing wrong?</p>