#include <typeinfo> ... cout << typeid(variable).name() << endl;
// Example std::cout << "Data-type = " << typeid(YourVariable).name() << " "; // Syntax typeid(YourVariable).name()