今天想弄个多线程玩玩,可是这编译器脑回路清奇
#include<cstdio>
#include<thread>
#include<stdlib.h>
using namespace std;
void threadA(){
printf("Hello World!");
}
int main(){
thread t(threadA);
}
本来应该是没事的,可是你猜编译器怎么说?
[Error] 'thread' was not declared in this scope
[Note] 'std::thread' is defined in header '<thread>'; did you forget to '#include <thread>'?
到底咋回事啊啊啊啊