title: Why can't you use a variable for an array size in C++?
body: <p>According to my C++ textbook, the following expression:</p>
  
  <pre><code>cout &lt;&lt; "Enter number of students\n";
  cin &gt;&gt; number;
  int score [number];
  </code></pre>
  
  <p>Is an <strong>ILLEGAL</strong> expression. 
  I cannot use a variable for the array size.</p>
  
  <p>Why can't I do this? (I'm not looking for an alternative, I haven't gotten into pointers, vectors etc, but I want to understand this behavior.)</p>