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); //运行时报错
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); //运行时报错