title: Can I get polymorphic behavior without using virtual functions?
body: <p>Because of my device I can't use virtual functions. Suppose I have:</p>
  
  <pre><code>class Base
  {
      void doSomething() { }
  };
  
  class Derived : public Base
  {
      void doSomething() { }
  };
  
  // in any place
  {
      Base *obj = new Derived;
      obj-&gt;doSomething();
  }
  </code></pre>
  
  <p>the <code>obj-&gt;doSomething()</code> will call just the <code>Base::doSomething()</code></p>
  
  <p>Is there a way with <code>Base *obj</code>, to call the <code>doSomething</code> of the <code>Derived</code>?</p>
  
  <p>I know I can just put a <code>virtual</code> before <code>doSomething()</code> of <code>Base</code> it solve the problem, but I'm limited by my device, the compiler doesn't support it.</p>