#include <typeinfo>
int iii = 100;
printf("%s ",typeid(iii).name());//类型
详见:http://www.cnblogs.com/SZxiaochun/p/7691574.html