C++ std::string 不可初始化为NULL
摘要:c++ 给std::string 赋值 NULL 运行报错 , 编译正常 错误截图: 字符串不可以初始化为NULL,虽然能通过编译,但是会出现运行错误 ,可以赋值为 "" (空字符串); 示例 : std::string res1 = NULL ; // 错误的 std::string res2 =
阅读全文
posted @ 2020-02-26 10:51
posted @ 2020-02-26 10:51
posted @ 2020-02-24 11:13