terminate called after throwing an instance of ‘std::logic_error’ what(): basic_string::_S_construct NULL not valid
主要原因:string对一个空指针进行操作。
例如:char* p = NULL:
string str(p); //运行时报错
版权声明:本文为ydyang1126原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
terminate called after throwing an instance of ‘std::logic_error’ what(): basic_string::_S_construct NULL not valid
主要原因:string对一个空指针进行操作。
例如:char* p = NULL:
string str(p); //运行时报错