title: Performing a deep copy on derived classes
body: <p>This has been bugging me lately.  Say I have a base class Base.  If I have multiple derived classes on top of Base, such as DerivedA and DerivedB, a deep copy gets to be a pain.</p>
  
  <pre><code>OtherClass(const OtherClass &amp; _rhs)
  {
      //I have a list of Base *, now I must assign a class id to each derived class to properly create a new one.
      //...
  }
  </code></pre>
  
  <p>Is there any way to get around this?</p>