Thanks guys. Ok, I have been playing around and come up with the following
code:
struct my_helper
{
void run(string filenm, string searchtext) {
FileThread object(filenm, searchtext);
object.find();
object.print();
}
};
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
*
.
2009/8/23 Brad Hubbard
Shaolin wrote:
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.
Look up "initialisation lists" (or "initialization lists" LOL).
Cheers, Brad
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users