title: static const double cannot have an in-class initializer. why is it so?
body: <p>The problem with the following code is static member of type &quot;const double&quot; cannot have an in-class initializer. Why is applicable only for a 'const double'in the following code? Please help me.</p>
  <pre><code>class sample{
     static const char mc = '?';
     static const double md = 2.2;
     static const bool mb = true;
  };
  const char sample::mc;
  const double sample::md;
  const bool sample::mb;
  int main(){
  }
  </code></pre>