花费 5 ms
std::string 赋值为nullptr引起程序崩溃

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

Mon Mar 18 06:21:00 CST 2019 0 662

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM