title: getting an extra unwanted value when resizing 2d vector
body: <p>I am trying to create a 4x3 matrix. There should be four 4 columns and 3 rows.
  it should look like this:</p>
  <pre><code>000
  000
  000
  000
  </code></pre>
  <p>Instead I am getting this as an output when I print out my 2d vector:</p>
  <pre><code>0000
  0000
  0000
  0000
  </code></pre>
  <p>This my simple code:</p>
  <pre><code> #include &lt;iostream&gt;
   #include &lt;vector&gt;
      
  int main(void) {
    
   
  std::vector&lt; std::vector&lt;int&gt; &gt; matrix;
  
  matrix.resize(4, std::vector&lt;int&gt;(3));
  
      for (unsigned int i = 0; i &lt; matrix.size(); i++)
    {
      for (unsigned int j = 0; j &lt; matrix.size(); j++)
      {
        std::cout &lt;&lt; matrix[i][j];
      }
      std::cout &lt;&lt; std::endl;
    }
  
     return 0;
  }
  </code></pre>
  <p>Could anyone help me ?
  Thanks in advance.</p>