猿代码 — 科研/AI模型/高性能计算
0

C++,terminate called after throwing an instance of 'std::logic_error'

摘要: 1) terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid 原来的代码: std::string type_filter = argv; //std::string type_filter = "s ...

 

 

 

1)

terminate called after throwing an instance of 'std::logic_error'

  what():  basic_string::_M_construct null not valid

 

原来的代码:

    std::string type_filter = argv[1];

    //std::string type_filter = "sobel";

    Filter      filter;

    int         option;

    type_filter = "sobel";

 

报了上面的错,改成下面的代码:

 

    //std::string type_filter = argv[1];

    std::string type_filter = "sobel";

    Filter      filter;

    int         option;

    //type_filter = "sobel";

 也有点晕,确实逻辑上说不清楚。


 

说点什么...

已有0条评论

最新评论...

本文作者
2024-1-12 00:02
  • 0
    粉丝
  • 476
    阅读
  • 0
    回复
资讯幻灯片
热门评论
热门专题
排行榜
Copyright   ©2015-2023   猿代码-超算人才智造局 高性能计算|并行计算|人工智能      ( 京ICP备2021026424号-2 )