在 C++ 中,如何找到变量的类型?
最佳答案
您可以使用 the typeid operator :
#include <typeinfo>
...
cout << typeid(variable).name() << endl;
关于c++ - 如何获取变量的类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11310898/
在 C++ 中,如何找到变量的类型?
最佳答案
您可以使用 the typeid operator :
#include <typeinfo>
...
cout << typeid(variable).name() << endl;
关于c++ - 如何获取变量的类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11310898/