c++ find out data types code example
Example 1: cpp get data type
#include <typeinfo>
...
cout << typeid(variable).name() << endl;
Example 2: c++ get data type
// Example
std::cout << "Data-type = " << typeid(YourVariable).name() << "\n";
// Syntax
typeid(YourVariable).name()