title: declare a array of const ints in C++
body: <p>I have a class and I want to have some bit masks with values 0,1,3,7,15,...</p>
  
  <p>So essentially i want to declare an array of constant int's such as:</p>
  
  <pre><code>class A{
  
  const int masks[] = {0,1,3,5,7,....}
  
  }
  </code></pre>
  
  <p>but the compiler will always complain.</p>
  
  <p>I tried:</p>
  
  <pre><code>static const int masks[] = {0,1...}
  
  static const int masks[9]; // then initializing inside the constructor
  </code></pre>
  
  <p>Any idea on how this can be done?</p>
  
  <p>Thanks!</p>