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