Answers for "how to get type of variable in cpp"

C++
2

cpp get data type

#include <typeinfo>
...
cout << typeid(variable).name() << endl;
Posted by: Guest on February-12-2021
2

get type of variable in c++

auto a = 10;
cout << typeid(a) << endl;
Posted by: Guest on December-16-2021

Code answers related to "how to get type of variable in cpp"

Browse Popular Code Answers by Language