title: error: a brace-enclosed initializer is not allowed here before '{' token
body: <p>I was wondering whether you guys could help me with a few errors I've commented out below. Can't believe I have this many already. </p>
  
  <pre><code>class CalculusWizard
  {
  
      private: 
          const static char varChars[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; // error: a brace-enclosed initializer is not allowed here before '{' token, error: invalid in-class initialization of static data member of non-itegral type 'const char[]'
          const static size_t varCharsLen = sizeof(varChars) / sizeof(const char); 
          const static enum functop = {NONE, PLUS, MINUS, TIMES, DIVIDE, COMPOSITION}; // error: use of enum 'functop' without previous declaration, error: unexpected qualified-id before '=' token
          bool isVariable(const char &amp;);
  
      public: 
          CalculusWizard();
          ~CalculusWizard();
          std::string derivative(std::string &amp;, const char &amp;, unsigned &amp;);
  
  };
  
  bool CalculusWizard::isVariable(const char &amp; c)
  {
      char * thisptr = varChars; // error: 'varChars' was not declared in this scope
      char * offend = varChars + varCharsLen;
      while (thisptr != offend)
          if (*thisptr++ == c)
              return true;
      return false;
      /*
       Alternatively, return c &gt;= 'a' &amp;&amp; c &lt;= 'z'
  }
  </code></pre>
  
  <p>Also, is there a better way of doing what I'm trying to do with <code>varChars</code> ???? The point is, I need an array of characters that every instance of <code>CalculusWizard</code> refers to. I thought a private <code>static</code> member was the way to go.</p>