title: What is the correct way of declaring typedef enum array combination in C/C++?
body: <p>I have the following code:</p>
  
  <pre><code>typedef enum MyEnum{
  A = 0,
  B,
  C,
  D
  } MyEnumArray[] = {A, B, C, D};
  </code></pre>
  
  <p>VS 2008 gives me the error</p>
  
  <blockquote>
    <p>C2513: 'MyEnum []' : no variable declared before '='</p>
  </blockquote>
  
  <p>What is the correct way of declaring an array directly from a <code>typedef enum</code>?</p>