Answers for "get datatype value in c++"

C++
2

cpp get data type

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

c++ get data type

// Example
std::cout << "Data-type = " << typeid(YourVariable).name() << "\n";
  
// Syntax
typeid(YourVariable).name()
Posted by: Guest on May-05-2021

Browse Popular Code Answers by Language