<br><br><div class="gmail_quote">On 3 January 2012 00:27, Timon Gehr <span dir="ltr"><<a href="mailto:timon.gehr@gmx.ch">timon.gehr@gmx.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On 01/03/2012 12:03 AM, RenatoL wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have:<br>
<br>
auto r = new int[][];<br>
<br>
Error: new can only create structs, dynamic arrays or class objects<br>
, not int[][]'s<br>
<br>
while<br>
<br>
auto r = new int[][3];<br>
<br>
is ok.<br>
</blockquote>
<br></div></div>
new int[][3] is an alternate form of new int[][](3); new int[][3] allocates an int[][] with 3 default-initialized elements.<br>
</blockquote></div><br>I assume `int[][] sth;` does what RenatoL wants to accomplish by `auto sth = new int[][];`. I do however have a question:<br>is `auto sth = new int[][5];` the same as `int[][5] sth;`? If not, what is the difference?<br>

<br>