Answers for "which variable type of c++"

C++
3

check variable type c++

if (typeid(variable) == typeid(std::string)) {
		std::cout << variable << " is a string" << std::endl;
	}
	else {
		std::cout << variable << " is not a string" << std::endl;
	}//you can do this for every type
Posted by: Guest on August-11-2021
0

define a type in c++

typedef [type] [name_of variable]
Posted by: Guest on December-20-2021

Browse Popular Code Answers by Language