push_back vector of vector
<p>i got some problem with vector of vector. in my program, i have defined a dynamic memory for vector of vector and did the resize and push_back the elements.</p>

<pre><code>vector&lt;vector&lt;double&gt; &gt; *planes = new vector&lt;vector&lt;double&gt; &gt;
planes-&gt;resize(s_list-&gt;size()); // size of another vector that i need to use
vector&lt;int&gt;::iterator s_no;
for(s_no=s_list-&gt;begin(), int i=0; s_no!=s_list-&gt;end(); s_no++, i++){){
                        //where i i the indices of planes

     //some codes for computing length, width

     planes-&gt;at(i).push_back(lenght);
     planes-&gt;at(i).push_back(width);
}
</code></pre>

<p>it works and i got the print of all values what i added. then, i changed new vector defining part as follows</p>

<pre><code>vector&lt;vector&lt;double&gt; &gt; *planes = 
              new vector&lt;vector&lt;double&gt; &gt;(s_list-&gt;size(),vector&lt;double&gt;(2,0.0))
</code></pre>

<p>and removed the resize part. then, when i got the print out of vector of vector, i got 0 values for all. could you please rectify this issue.</p>
