本文共 129 字,大约阅读时间需要 1 分钟。
(转自:)
如变量int a;
我们可以利用库函数typeid,来判断变量a是否为整型变量;
如:
if (typeid(a) == typeid(int))
这个库函数typeid在头文件typeinfo.h中。
#include <typeinfo.h>
转载地址:http://idqkb.baihongyu.com/