Assignment operator and deep copy
<p>I'm learning C++ and there is something I don't get about assignment operators. As far as I understand, they are supposed to provide deep copies of object. Here is an example</p>

<pre><code>Test::Test(int i){
    value = i;
}

Test&amp; Test::operator=(const Test&amp; rhs){
    value = rhs.value;
    return *this;
}
</code></pre>

<p>Now:</p>

<pre><code>Test* t1 = new Test(1);
Test* t2 = t1;  //t2 should be now a deep copy of t1
t1-&gt;value = 2;
cout &lt;&lt; t1-&gt;value;
cout &lt;&lt; t2-&gt;value;
</code></pre>

<p>Output is <code>22</code> but I expected '21'. What is the obvious thing I am missing here?</p>
