How do I get the type of a variable? September 4, 2022 by Tarik You can use the typeid operator: #include <typeinfo> ... cout << typeid(variable).name() << endl;