Why its dangerous to use pass by value when function parameter expects an Abstract class object?
<p>I read below statements in Addison Wesley FAQs.</p>

<blockquote>
  <p>Beware: passing objects by value can
  be dangerous in some situations. Often
  it is  better to pass objects by
  reference-to-const than to pass them
  by value. For example,  pass-by-value
  won't work if the destination type is
  an abstract base class and can  result
  in erroneous behavior at runtime if
  the parameter's class has derived
  classes.  However if the class of the
  parameter is guaranteed not to have
  derived classes, and if  the function
  being called needs a local copy to
  work with, pass-by-value can be
  useful.</p>
</blockquote>

<p>How it can be erroneous behavior at runtime if destination type is an Abstract class and if the parameter's class has derived class ?
Does copy constructor solve this problem ? If so, how ? Thank you.</p>

<p>EDIT: So, should the statement above be <strong>"erroneous behavior at compile time"</strong> ? Not "runtime" .</p>
