本文主要是介绍terminate called after throwing an instance of ‘std::logic_error‘,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
编译正常,运行的时候报错
terminate called after throwing an instance of ‘std::logic_error’
我的错误原因是在定义结构体内变量并初始化时,误把整形赋值给了string变量
struct LabelAndPoint
{std::string frame_id =0;};
解决办法
struct LabelAndPoint
{std::string frame_id;};
这篇关于terminate called after throwing an instance of ‘std::logic_error‘的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!