Answers for "check data type of object in c++"

C++
5

how to check datatype of a variable in c++

#include <typeinfo>
...
cout << typeid(variable).name() << endl;
Posted by: Guest on May-29-2020
2

get type of an object c++

//get type of a
typeid(a).name()
Posted by: Guest on April-17-2021

Browse Popular Code Answers by Language