Boost logo

Boost Users :

Subject: Re: [Boost-users] Invoke several functions with the same thread
From: Oliver Seiler (oseiler_at_[hidden])
Date: 2009-08-23 13:01:48


That should be:

boost::bind(&my_helper::run, &my, filearr[i], search)

(for some definition of search)

In this case, bind is taking a pointer to the member function plus a
pointer to the object, followed by the arguments.

On Sun, Aug 23, 2009 at 8:53 AM, Shaolin<shaolinfinest_at_[hidden]> wrote:
> [...]
> int main() {
>      boost::thread_group threads;
>      my_helper my;
>      threads.create_thread(boost::bind(&my::run, filearr[i], search));
> }
>
> The problem is the create_thread function returns the following error on
> compile:
>
> error: ‘my’ is not a class or namespace


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