Answers for "how to find variable type 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
0

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 find variable type in c++"

Browse Popular Code Answers by Language