Boost logo

Boost Users :

Subject: Re: [Boost-users] Invoke several functions with the same thread
From: Michael Caisse (boost_at_[hidden])
Date: 2009-08-22 22:27:17


Shaolin wrote:
> Thanks for the reply Michael. The first example looks easier to
> digest. I have a question, what exactly does the following piece of
> code from the struct do:
>
> my_helper(FileThread* object) : object_( object ){}
>
> I have seen it used once or twice before but cant find any
> documentation on it.
>

Shaolin -

This is simply a constructor for the my_helper structure. It takes a pointer
to a FileThread object.

'object_' is a member variable and it is being initialized in the
initializer
list of the constructor with 'object'.

You may also want to look through a C++ tutorial.

Regards -
Michael

-- 
----------------------------------
Michael Caisse
Object Modeling Designs
www.objectmodelingdesigns.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net