title: C++ a member with an in-class initializer must be const
body: <p>I am trying to create a static string in my class: (in my header file)</p>
  
  <pre><code>static string description = "foo";
  </code></pre>
  
  <p>but I'm getting this error:</p>
  
  <pre><code>IntelliSense: a member with an in-class initializer must be const
  </code></pre>
  
  <p>if I change it to this:</p>
  
  <pre><code>static const string description = "foo";
  </code></pre>
  
  <p>I get this error instead:</p>
  
  <pre><code>IntelliSense: a member of type "const std::string" cannot have an in-class initializer
  </code></pre>
  
  <p>What did I do wrong?</p>