//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
The above compiled perfectly, but when I run ./test. I just get an error message that says "pure virtual method called , terminate called without an active exception"
Can anyone help me? Thanks!