c++;无法解决linux eclipse函数运行时错误

c++;无法解决linux eclipse函数运行时错误,eclipse,c++11,runtime-error,throw,Eclipse,C++11,Runtime Error,Throw,在世纪月食中。有一个bug说“函数运行时错误无法解决”。我在设置中添加了-std=c++11或-std=c++0x,并重建了索引。(见附件) 它仍然显示CDT中的一个bug。 但在我的makefile中,我添加了-std=c++0x,它编译时没有错误 线路上有一个错误 抛出运行时_错误(“错误消息”); 我包括了那些头文件 #include <cerrno> #include <system_error> using namespace std;

在世纪月食中。有一个bug说“函数运行时错误无法解决”。我在设置中添加了-std=c++11或-std=c++0x,并重建了索引。(见附件) 它仍然显示CDT中的一个bug。 但在我的makefile中,我添加了-std=c++0x,它编译时没有错误

线路上有一个错误 抛出运行时_错误(“错误消息”); 我包括了那些头文件

    #include <cerrno>
    #include <system_error>
    using namespace std;
    void main()
    {
         throw runtime_error("blabla");
    }
#包括
#包括
使用名称空间std;
void main()
{
抛出运行时_错误(“blabla”);
}

在代码中,我也使用了名称空间std;或者您可以添加std::runtime_error(“…”);在代码中,您可以添加std::它提示选择有“\uuuu throw\u runtime\u error()”,当我使用它时,它有编译错误“error:invalid use of'void'”,代码更改为“uuuuu throw\u runtime\u error(“”);从运行时抛出错误(“”);它被编译了。