title: C++ static struct init - item does not name a type
body: <p>I am trying to put my solution in a static class, which is defined like: </p>
  
  <pre><code>class myDataParser{
      private:
  
      public:
      struct myData{
          struct index {
              static int item1,item2,item3,item4;
          };
          static char delimiter;
      };
  
  };
  </code></pre>
  
  <p>But when I try to init the items in the main program like this:</p>
  
  <pre><code>myDataParser::myData::delimiter = ';';
  myDataParser::myData::index::item1 = 0;
  myDataParser::myData::index::item2 = 1;
  myDataParser::myData::index::item3 = 2;
  myDataParser::myData::index::item4 = 3;
  </code></pre>
  
  <p>I get error:</p>
  
  <pre><code>'item1' in 'struct myDataParser::myData::index' does not name a type
  </code></pre>
  
  <p>...same goes for delimiter and item2-4, what am I doing wrong? How would I set these members correctly?</p>