title: Designated Initializers in C99: How to handle empty uninitialized struct members in C11?
body: <p>Since in C I can call the members of a struct by name (myStruct.myMember = ) I was wondering what I would do in C++ with those members that are not initialized.
  So as I understood, C++ does not support this kind of initialization:</p>
  
  <pre><code>static struct usb_endpoint_descriptor  fs_source_desc = {
          .bLength =      USB_DT_ENDPOINT_SIZE,
          .bDescriptorType =  USB_DT_ENDPOINT,
          .bmAttributes =     USB_ENDPOINT_XFER_BULK,
          .wMaxPacketSize =   __constant_cpu_to_le16 (64),
      };
  </code></pre>
  
  <p>But when I use correct syntax, how do I handle members that are not initialized?
  Let's say I want <code>bDescriptorType</code> uninitialized. Do I set it to NULL?</p>
  
  <pre><code>static struct usb_endpoint_descriptor fs_source_desc = {
      USB_DT_ENDPOINT_SIZE,
          NULL,
          USB_ENDPOINT_XFER_BULK,
          __constant_cpu_to_le16 (64)
  };
  </code></pre>
  
  <p>Or is there any way in C++ to initialize the structure's members by their name?</p>