关于多线程
  • 板块灌水区
  • 楼主___cjy__
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/9/23 14:38
  • 上次更新2024/9/23 14:42:12
查看原帖
关于多线程
509668
___cjy__楼主2024/9/23 14:38

在本地DevC中运行出现一行奇怪的报错

报错:

32 2 C:\Users\Administrator\Desktop\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\bits\c++0x_warning.h [Error] #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

源代码:

void out1(){
	while(1){
		cout << "1";
		Sleep(100);
	}
}


signed main(){
	HANDLE ht;
	DWORD theadID;
	
	ht = CreateThread(NULL,0,out1,NULL,0,NULL);
	
	if(ht == NULL){
		printf("error!!");
	}
	while(1){
		cout << "2";
		Sleep(100);
	}
	
	
	return 0;
}

求解答,或者是否能推荐一些关于多线程的优质 blog?

2024/9/23 14:38
加载中...