33,311
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <typeinfo>
using namespace std;
int main(void)
{
int a, b;
float c;
if(typeid(a) == typeid(b))
cout << "Var type of a and b is equal." << endl;
if(typeid(a) != typeid(c))
cout << "Var type of a and c is different." << endl;
return 0;
}