title: C++ doesn't tell you the size of a dynamic array. But why?
body: <p>I know that there is no way in C++ to obtain the size of a dynamically created array, such as:</p>
  
  <pre><code>int* a;
  a = new int[n];
  </code></pre>
  
  <p>What I would like to know is: Why?  Did people just forget this in the specification of C++, or is there a technical reason for this?</p>
  
  <p>Isn't the information stored somewhere?  After all, the command</p>
  
  <pre><code>delete[] a;
  </code></pre>
  
  <p>seems to know how much memory it has to release, so it seems to me that <code>delete[]</code> has some way of knowing the size of <code>a</code>.</p>