Answers for "check if a variable is tring c++"

C++
0

check if a variable is tring 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;
	}
Posted by: Guest on August-11-2021

Code answers related to "check if a variable is tring c++"

Browse Popular Code Answers by Language