📌  相关文章
📜  检查变量是否在字符串 c++ 代码示例

📅  最后修改于: 2022-03-11 14:44:50.431000             🧑  作者: Mango

代码示例1
if (typeid(variable) == typeid(std::string)) {
        std::cout << variable << " is a string" << std::endl;
    }
    else {
        std::cout << variable << " is not a string" << std::endl;
    }