C++11 多线程并发1

来源:互联网 发布:下载中文ae软件 编辑:程序博客网 时间:2024/06/10 20:46
#include <iostream>#include <stdio.h>#include <thread>using namespace std;void thread_task(){    cout<<" hello thread" <<endl;}int main(){    thread T(thread_task);    T.join();    return 0;}#make file  
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -std=c++11 -ggdb -std=c++11")

0 0
原创粉丝点击