2d Vector with wrong values
<p>I'm studing STL, then i thought "i'll make a 2d array!" but whatever...</p>

<p>a coded this:</p>

<pre><code>vector&lt; vector&lt;int&gt; &gt; vetor;

vetor.resize(10);
vetor[0].resize(10);

for(int i = 0; i &lt; vetor.capacity(); i++){
    for(int h = 0; h &lt; vetor[0].capacity();h++){
        vetor[i][h] = h;
    }

}
</code></pre>

<p>Until here, ok. But when i try to show the array value a use this:</p>

<pre><code>for(int i = 0; i &lt; vetor.capacity(); i++){
    cout &lt;&lt; "LINE " &lt;&lt; i &lt;&lt; ": ";
    for(int h = 0; h &lt; vetor[0].capacity();h++){
        cout &lt;&lt; vetor[i][h] &lt;&lt;" ";
    }
    cout &lt;&lt; "\n";
}
</code></pre>

<p>And the results are really wrong:</p>

<pre><code>LINE 0: 4 5 6 7 8 9 6 7 8 9
LINE 1: 0 1 2 3 0 1 2 3 0 1
LINE 2: 0 1 2 3 0 1 2 3 0 1
LINE 3: 0 1 2 3 0 1 2 3 0 1
LINE 4: 0 1 2 3 0 1 2 3 0 1
LINE 5: 0 1 2 3 0 1 2 3 0 1
LINE 6: 0 1 2 3 0 1 2 3 0 1
LINE 7: 0 1 2 3 0 1 2 3 0 1
LINE 8: 0 1 2 3 0 1 2 3 4 5
LINE 9: 0 1 2 3 4 5 6 7 8 9
</code></pre>

<p>What's happening with my program? it isn't printing the right values!</p>
