0x499602D2 0x499602D2 - 1 year ago 89
C++ Question

How do I get the type of a variable?

In C++, how does one find the type of a variable?

Answer Source

You can use the typeid operator:

#include <typeinfo>
cout << typeid(variable).name() << endl;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download