title: Does dynamic_cast require virtual function?
body: <p>For example:</p>
  
  <pre><code>class Animal
  {
      virtual void dummy() {};         //LINE1
  }
  
  class Cat : public Animal
  {
  
  }
  
  Animal* a = new Cat();
  if (Cat* c = dynamic_cast&lt;Cat*&gt; (a))  //LINE2
  {
       //Do something.
  }
  </code></pre>
  
  <p>If I remove LINE1 from the Animal class (i.e. Animal class does not contain virtual members), LINE2 will not work. </p>