//test.cpp
#include<iostream>
#include<thread>
using namespace std;
void call()
{
cout<<"hello world"<<endl;
}
int main()
{
thread t(call);
t.join();
return 0;
}
g++-4.7 -std=c++11 test.cpp -o test -pthread
上記は完全にコンパイルされましたが、./test. 「純粋な仮想メソッドが呼び出され、アクティブな例外なしで呼び出されて終了します」というエラーメッセージが表示されます
誰でも私を助けることができますか?ありがとう!