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