<分区>
我的程序如下所示
#include <iostream>
#include <thread>
#include <exception>
void hello()
{
std::cout << "Hello world!!!!" << std::endl;
}
int main()
{
std::cout << "In Main\n";
std::thread t(hello);
t.join();
return 0;
}
当我使用以下命令编译它时,我没有得到任何错误
g++-4.7 -std=c++11 main.cpp
但是当我运行它时,出现了以下错误
In Main terminate called after throwing an instance of 'std::system_error' what(): Operation not permitted Aborted (core dumped)
有人可以帮我解决我哪里出错了吗?