#include <boost/thread/thread.hpp>
#include <iostream>
void hello()
{
std::cout <<"Hello world, I'm a thread!"<< std::endl;
}
int main(int argc, char* argv[])
{
boost::thread thrd(&hello);
thrd.join();
return 0;
}
/*
Hello world, I'm a thread!
请按任意键继续. . .
*/
boost创建线程例子
最新推荐文章于 2022-11-04 09:17:06 发布