#include <boost/thread/thread.hpp>
#include <boost/bind.hpp>
#include <iostream>
void threadFunc(const char* pszContext)
{
std::cout << pszContext << std::endl;
}
int main(int argc, char* argv[])
{
char* pszContext = "fengyuzaitu@126.com";
boost::thread thread1(boost::bind(&threadFunc, pszContext));
thread1.join();
return 0;
}
参考http://blog.csdn.net/iamnieo/article/details/2908621
原文地址:http://fengyuzaitu.blog.51cto.com/5218690/1951940