title: When is dynamic_cast required?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2253168/dynamic-cast-in-c">dynamic_cast in c++</a>  </p>
  </blockquote>
  
  
  
  <p>What is the difference between these two ways of assigning a derived class to a base class pointer?</p>
  
  <pre><code>Derived d1;
  Base *b1 = &amp;d1 
  
  Derived d2;
  Base *b2 = dynamic_cast&lt;Base*&gt; &amp;d2
  </code></pre>