mirror of
https://github.com/boostorg/thread.git
synced 2026-01-21 05:22:15 +00:00
14 lines
271 B
C++
14 lines
271 B
C++
#include <boost/thread/thread.hpp>
|
|
#include <boost/bind.hpp>
|
|
#include <iostream>
|
|
|
|
void helloworld(const char* who)
|
|
{
|
|
std::cout << who << "says, \"Hello World.\"" << std::endl;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
boost::thread thrd(boost::bind(&helloworld, "Bob"));
|
|
thrd.join();
|
|
} |