title: Array definition - Expression must have a constant value
body: <p>I am creating an array on stack as </p>
  
  <pre><code>static const int size = 10;
  
  void foo() {
  ..
  int array[size];
  ..
  }
  </code></pre>
  
  <p>However, I get the compile error: "expression must have a constant value", even though size is a constant. I can use the macro</p>
  
  <pre><code>#define SIZE (10)
  </code></pre>
  
  <p>But I am wondering why <code>size</code> marked <code>const</code> causes compilation error.</p>