自己写代码的时候,出现了一下提示
terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid
百度时候别人说是输入文件有错误,我仔细检查了代码,我竟然给一个string赋值为0,可能不小心打上去的。所以如果出现这类的提示错误,记得去赋值初始化等等看,是不是非法的。
自己写代码的时候,出现了一下提示
terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid
百度时候别人说是输入文件有错误,我仔细检查了代码,我竟然给一个string赋值为0,可能不小心打上去的。所以如果出现这类的提示错误,记得去赋值初始化等等看,是不是非法的。