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