In C++, how does one find the type of a variable?
You can use the typeid operator:
#include <typeinfo> ... cout << typeid(variable).name() << endl;
1.4m articles
1.4m replys
5 comments
57.0k users