title: How can I resize a 2D C++ vector?
body: <p>I have a 2D <code>char</code> vector:</p>
  
  <pre><code>vector&lt; vector&lt;char&gt; &gt; matrix;
  </code></pre>
  
  <p>I will read in a matrix as an input and store it in that vector. The size of my vector is fixed and is ROW x COL. I guess I need to resize it for each row and column.</p>
  
  <p>How can I accomplish it without taking extra memory (resizing it correctly)? </p>