#include<typeinfo>
using std::cout;
int main()
{
    int i;
    cout << typeid(i).name();
    //输出结果为int
    return 0;
}

需要引入头文件:#include<typeinfo>

相关文章:

  • 2021-05-22
  • 2022-01-17
  • 2022-02-13
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-12-25
  • 2022-01-14
猜你喜欢
  • 2022-01-16
  • 2022-01-04
  • 2021-07-09
  • 2021-12-24
  • 2021-07-31
  • 2021-12-10
相关资源
相似解决方案