title: Is it possible to dynamically create an array of constant size in C++?
body: <p>First of all, I want to reassure you all that I am asking this question out of curiosity. I mean, don't tell me that if I need this then my design has problems because I don't need this in real code. Hope I convinced you :) Now to the question:</p>
  
  <p>For most types T we can write</p>
  
  <pre><code>T* p = new T;
  </code></pre>
  
  <p>now what if T is an array type?</p>
  
  <pre><code>int (*p)[3] =  new ???; //pointer to array of 3 = new ???
  </code></pre>
  
  <p>I tried this:</p>
  
  <pre><code>typedef int arr[3];
  arr* p = new arr;
  </code></pre>
  
  <p>but this doesn't work.</p>
  
  <p>Is there any valid syntax for this or it is impossible in C++. If it is impossible, then why? Thanks</p>
  
  <p><em><strong>Edit</em></strong>: i am guessing I wasn't clear enough. I want to be able to use it in this situation:</p>
  
  <pre><code>void f(int(&amp;)[3]);
  int (*p)[3] = new ???;
  f(*p);
  </code></pre>