title: Is there a way to statically-initialize a dynamically-allocated array in C++?
body: <p>In C++, I can statically initialize an array, e.g.:</p>
  
  <pre><code>int a[] = { 1, 2, 3 };
  </code></pre>
  
  <p>Is there an easy way to initialize a dynamically-allocated array to a set of immediate values?</p>
  
  <pre><code>int *p = new int[3];
  p = { 1, 2, 3 }; // syntax error
  </code></pre>
  
  <p>...or do I absolutely have to copy these values manually?</p>