title: How to correctly fix "zero-sized array in struct/union" warning (C4200) without breaking the code?
body: <p>I'm integrating some code into my library. It is a complex data structure well optimized for speed, so i'm trying not to modify it too much. The integration process goes well and actually is almost finished (it compiles). One thing is still bothering me. I'm getting the C4200 warning multiple times:</p>
  
  <pre><code>warning C4200: nonstandard extension used : zero-sized array in struct/union
  Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
  </code></pre>
  
  <p>The code <strong>works</strong> but this warning gives me creeps (especially the part with copy-ctor). THe warning appears because of structures declared like this:</p>
  
  <pre><code>#pragma pack( push )
  #pragma pack( 1 )
  // String
  struct MY_TREEDATSTR
  {
      BYTE btLen;
      DWORD dwModOff;
      BYTE btPat[0];
  };
  
  typedef MY_TREEDATSTR TREEDATSTR;
  typedef MY_TREEDATSTR *PTREEDATSTR;
  
  #pragma pack( pop )
  </code></pre>
  
  <p>Note the <code>btPat[0]</code>. Is there a way how to easily and <strong>correctly</strong> get rid of this warning without breaking the code and/or having to change too much in it. Notice the <code>#pragma</code>'s, have their any significance according to this warning? And why is the structure declared this way anyway? (I mean the <code>btPat</code> thing, not the <code>#pragma</code>'s, those i understand).</p>
  
  <p>Note: i saw <a href="https://stackoverflow.com/questions/1259803/what-does-zero-sized-array-allocation-do-mean">this similar question</a>, but it really didn't help me.</p>
  
  <p>Update: as I said, the code works and gives correct results. So a copy-constructor or assignment operator is apparently really not needed. And as i look at the code, none of the structures get memcpy-ed.</p>