
23 Aug
2009
23 Aug
'09
5:01 p.m.
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
[...] 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