Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/thread/tutorial/helloworld2.cpp @ 47

Last change on this file since 47 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 537 bytes
Line 
1// Copyright (C) 2001-2003
2// William E. Kempf
3//
4//  Distributed under the Boost Software License, Version 1.0. (See accompanying
5//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7#include <boost/thread/thread.hpp>
8#include <iostream>
9
10struct helloworld
11{
12    helloworld(const char* who) : m_who(who) { }
13    void operator()()
14    {
15        std::cout << m_who << "says, \"Hello World.\"" << std::endl;
16    }
17    const char* m_who;
18};
19
20int main()
21{
22    boost::thread thrd(helloworld("Bob"));
23    thrd.join();
24}
Note: See TracBrowser for help on using the repository browser.