0x499602D2 0x499602D2 - 4 months ago 9
C++ Question

How do I get the type of a variable?

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

Answer

You can use the typeid operator:

#include <typeinfo>
...
cout << typeid(variable).name() << endl;