c++ declare an array of arrays without know the size
<p>I must declare an array of arrays or multidimensional array without know the size.
I want to do something similar that I do in this cases with simple arrays:</p>

<pre><code>int *array;
cin &gt;&gt; size;
array = new int[size];
</code></pre>

<p>Maybe I can do a loop to initialize a pointer of pointers like this:</p>

<pre><code>int **array;
cin &gt;&gt; rows &gt;&gt; col;
array = new *int[rows]
for (int i = 0; i &lt; rows; ++i)
    array[i] = new int[col];
</code></pre>

<p>But I prefer don't do this if a better solution is possible.</p>
