Answers for "get type cpp"

C++
2

cpp get data type

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

c++ get type name

typeid(a).name()
Posted by: Guest on November-07-2021
0

c++ get type name of object

#include <iostream>

int main() {
	int myNum;
  	std::cout << typeid(myNum).name();
  	return 0;
}
Posted by: Guest on May-07-2020

Browse Popular Code Answers by Language