Dynamic allocation of nested vectors
<p>I did something like:</p>

<pre><code>Grid(int row, int col):num_of_row_(row), num_of_col_(col) {
     grid_ = new vector&lt;vector&lt;bool&gt; &gt; (row, col);  
}
</code></pre>

<p>which dynamically allocates nested vector. Is this correct? I mean using this syntax:</p>

<pre><code>new vector&lt;vector&lt;type&gt; &gt; (outersize, innersize)
</code></pre>

<p>where ** outersize, innersize are both "int" variables.**</p>

<p>update:
I actually used this code, and it works. I just want to find out why.</p>
