typeid判断类型

When typeid is applied to a reference or dereferenced pointer to an object of a polymorphic class type (a class declaring or inheriting a virtual function), it considers its dynamic type (i.e., the type of the most derived object). This requires the RTTI (Run-time type information) to be available.

posted @ 2014-05-06 13:34  coder_zhang1  阅读(144)  评论(0)    收藏  举报