c++ How to use a ctor from another ctor?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/12030769/calling-another-constructor-when-constructing-an-object-with-const-members">Calling another constructor when constructing an object with const members</a>  </p>
</blockquote>



<p>I want the latter to use the former. How can i do that in c++?. If it's not possible why can't i make the <code>*this = regMatrix</code> assignment? </p>

<pre><code>RegMatrix::RegMatrix(int numRow,int numCol)
{
    int i;
    for(i=0;i&lt;numRow;i++)
    {
        _matrix.push_back(vector&lt;double&gt;(numCol,0));
    }
}

RegMatrix::RegMatrix(const SparseMatrix &amp;sparseMatrix)
{
    RegMatrix regMatrix(sparseMatrix.getNumRow(),sparseMatrix.getNumCol());
    vector&lt;Node&gt; matrix = sparseMatrix.getMatrix();
    cout &lt;&lt; "size: " &lt;&lt; matrix.size() &lt;&lt; endl;
    for(std::vector&lt;Node&gt;::const_iterator it = matrix.begin(); it != matrix.end(); ++it )
    {
        cout &lt;&lt; "Position: [" &lt;&lt; (*it).i &lt;&lt; ", " &lt;&lt; (*it).j &lt;&lt; "] Value:" &lt;&lt; (*it).value &lt;&lt; endl;
        regMatrix._matrix[(*it).i][(*it).j] = (*it).value;
    }

    *this = regMatrix;
}
</code></pre>
