Copy object - keep polymorphism

前端 未结 4 2052
借酒劲吻你
借酒劲吻你 2020-12-06 07:13

The following code tries to copy an object and keep the original type. Unfortunately it does not work (every copied object will become a Super instead of being

4条回答
  •  天涯浪人
    2020-12-06 08:01

    Just for the record, this is in the C++ FAQ:

    http://www.dietmar-kuehl.de/mirror/c++-faq/abcs.html#faq-22.5

提交回复
热议问题