how to see type of a variable in c++ code example
Example 1: c++ how to check type of variable
typeid(variable).name()
Example 2: how to check datatype of a variable in c++
#include <typeinfo>
...
cout << typeid(variable).name() << endl;
Example 3: how to know datatype of something in c++
int k;
cout << typeid(k).name() << endl;