Answers for "cpp get the type of a variable"

C++
2

cpp get data type

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

how to get the type of a variable in c++

int a = 5;
cout << typeid(a).name() << endl;
Posted by: Guest on April-14-2022

Code answers related to "cpp get the type of a variable"

Browse Popular Code Answers by Language