title: Vector initialized by enum
body: <p>The following code doesn't build. </p>
  
  <pre><code>struct some_struct {
      some_struct() {
        ... do something here to specify size of v; how ??
      }
      enum {
         ZERO,
         ONE,
         TWO
      };
  
      static std::vector&lt;std::string&gt; v(TWO);
  };
  </code></pre>
  
  <p>Appreciate any ideas.. nothing seems to suggest this is illegal use.</p>
  
  <p>Typo: Fixed the vector syntax and correction: I have only tested on 2005/2008, not 2010. The error message for those who asked: </p>
  
  <pre><code>error C2061: syntax error : identifier 'TWO'
  </code></pre>
  
  <p>Further edit:</p>
  
  <p>It looks like the compiler thinks <code>v</code> is a function that returns type <code>std::vector&lt;std::string&gt;</code>; all of this is inside a <code>struct</code> (I have now further corrected my post to clarify this some more). Perhaps I need to leave out the size argument which it confuses with a type and declare the size somewhere in the constructor? I meant for this vector to be a static data member of the struct. How do I get the compiler to understand this? </p>
  
  <p>NOTE: On Linux I tested it on a standalone code resembling what I had up originally (without the struct)... so maybe it wouldn't compile on Linux with this correction. So I removed the comment that it built OK on Linux. Apologies.</p>