title: vector resize() automatic fill
body: <p>I'm writing a class that holds a matrix (of double values), represented as <code>vector&lt;vector&lt;double&gt;&gt;</code>;</p>
  
  <p>I want to implement the <code>operator=</code>, to re-fill my matrix with the details of a given sparse matrix. I'm writing the following code:</p>
  
  <pre><code>RegMatrix&amp; RegMatrix::operator=(const SparseMatrix rhs){
      if(*this != rhs){
          _matrix.clear();
          _matrix.resize(rhs.getRow());
          int i;
          for(i=0;i&lt;rhs.getRow();++i){
              _matrix.at(i).resize(rhs.getCol());
          }
  
          for(i=0;i&lt;rhs.getSize();++i){
              Element e = rhs.getElement(i);
              _matrix[e._row][e._col] = e._val; 
          }
      }
  
      return *this;
  }
  </code></pre>
  
  <p>Does the <code>resize()</code> method fill automatically the vector with zeros?
  Is my implementation ok?</p>