terminate called after throwing an instance of ‘std::logic_error‘错误修改方法

错误提示:
准确说编译器并没有报错,但在终端有如下提示:

terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
1
2
修改方法:
检查一下程序中是否给一个string类型的变量初始化为0的情况。

posted @ 2022-07-15 22:26  stdxxd  阅读(1257)  评论(0)    收藏  举报