How to know the type of a variable in C++?
To check the type of a variable in C++, you can use typeid(variable).name(), for example #include <typeinfo> … … int b=9; char c=’a’; char * p=&c; int *d; printf(“%s\n”,typeid(b).name()); printf(“%s\n”,typeid(c).name()); […]