C++判断对象类型

判断对象类型用typeid(),想要输出类型用typied(a).name(),其头文件为#include <typeinfo>;

如下图所示(建议可以了解typied      可看下此博文https://blog.csdn.net/zkybeck_ck/article/details/51762541):

 

 

posted @ 2019-04-21 00:03  tangjunjun  阅读(5355)  评论(0编辑  收藏  举报
https://rpc.cnblogs.com/metaweblog/tangjunjun