我线程程序是:错误编译线程程序
#include<iostream>
#include<thread>
using namespace std;
void t()
{
cout<<"from thread\n";
}
int main()
{
thread i(&t);
cout <<"from main\n";
i.join();
}
,但它显示的代码块以下错误:
1)'thread ' was not declared in this scope
2)expected ';' before 'i'
3)'i' was not declared in this scope
我怎样才能解决这个问题我使用Windows和代码块12.11
http://stackoverflow.com/questions/8513980/how-to-compile-the-code-using-include-thread – 2013-04-10 14:31:20