Return a new array with specified values?
<p>Is there a way to write the following function code</p>

<pre><code>int* returnFilledArray() {
 int* arr = new int[2];
 arr[0] = 1;
 arr[1] = 2;
 return arr;
}
</code></pre>

<p>somehow like that? (create and fill the array as one liner).</p>

<pre><code>int* returnFilledArray() {
 return new int {1,2};
}
</code></pre>

<p>if have tried various combinations, but I allways get some syntax errors, so when if it's 
possible I would be thankful for a detailed explanation.</p>
