title: How can I resize a 2D vector of objects given the width and height?
body: <p>My class, <code>GameBoard</code>, has a member variable that is a 2D vector of an object of the class <code>Tile</code>. The <code>GameBoard</code> constructor takes width and height as parameters.</p>
  
  <p>How can I get the 2D vector of <code>Tile</code> objects to resize according to the width and height passed to the constructor?  How can I fill it with <code>Tile</code> objects so that I can do something like this?</p>
  
  <pre><code>myVector[i][j].getDisplayChar();
  </code></pre>
  
  <p><strong>Snippet</strong></p>
  
  <pre><code>m_vvTiles.resize(iHeight);
  
  for(auto it = m_vvTiles.begin(); it != m_vvTiles.end(); it++ ){
  
      (*it).resize(iWidth,Tile(' '));
  }
  </code></pre>