多线程编程
创建线程
#include <thread>
#include<iostream>
using namespace std;
void myprint() {
cout << "my print thread start" << endl;
cout << "my print thread finished" << endl;
}
int main()
{
thread mytodj(myprint);
mytodj.join();
cout << "main thread finished!" << endl;
return 0;
}