Why downcasting needs typecasting to work?
<p>Why do we need typecasting when do downcasting?</p>

<p>Suppose, I have a baseclass B and a derived class D. Now I create two instances b, d of B, D respectively. Why d = b is not possible without typecasting, even though d is everything that b has. However the reverse(i.e. b = d) is possible.</p>

<pre><code>class B  
{  
    /* body */  
};  
class D : public B  
{  
    /* body */   
};

void f()  
{  
    B b;  
    D d;

    b = d;       /* OK */
    d = b;       /* Not OK */

return;  
}  
</code></pre>
