这个问题在这里已经有了答案:Whyis'objectslice'neededinC++?Whyitisallowed?Formorebugs?(5个答案)关闭5年前。我刚刚创建了一个异常层次结构,并希望我的catchblock显示派生异常的消息。我有5个这样的异常:classImagetypeException:publicTGAException{public:constchar*what()constthrow();};constchar*ImagetypeException::what()constthrow(){return"DerBildtypistnicht\"RGBunk