18,356
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <boost/thread/thread.hpp>
#include <iostream>
namespace boost {
struct boost::thread::dummy {};
}
class HelloWorld
{
public:
static void hello()
{
std::cout<<"Hello world, I'm a thread!"<<std::endl;
}
static void start()
{
boost::thread thrd(hello);
thrd.join();
}
};
int main()
{
HelloWorld::start();
system("pause");
return 0;
}