运行时错误: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

如图:

主要原因:对一个空指针进行操作。

例如:char  *p  =  NULL;

Json::Value val;

Json::Reader read;

read.parse(p, val);              //运行时报错

猜你喜欢

转载自blog.csdn.net/judgejames/article/details/84666468