<分区>
Possible Duplicate:
C++11 threading on Windows
标题几乎描述了它,我正在尝试使用以下代码:
#include <thread>
#include <iostream>
using namespace std;
void task_1(){
cout << "Thread 1" << endl;
}
int main(){
thread task(task_1);
task.join();
return 1;
}
但它给出了一个编译器错误
D:\dev\cpp\trash\thread.cpp|11|error: 'thread' was not declared this scope|
我正在使用 Code:Blocks 10.05 和 GNU GCC 编译器,带有选项 -std=c++0x
Code:Blocks 最近刚刚下载,所以我猜一切都应该是最新的。