std::string 赋值为nullptr引起程序崩溃
一个错误排查两天,std::string赋初值时最好为"", 如果赋初值为nullptr,因为std::string不能和nullptr作比较,所以后面用的时候会引起崩溃。 佩服我这脑子...因为派 ...
一个错误排查两天,std::string赋初值时最好为"", 如果赋初值为nullptr,因为std::string不能和nullptr作比较,所以后面用的时候会引起崩溃。 佩服我这脑子...因为派 ...