27 Jan
2011
27 Jan
'11
10:47 a.m.
Dear List members, I am trying to make use of threads within a class, but seem to be having problems with the syntax and getting it to compile. The outline of my class related to this thread issue is as follows: class Board{ public: void pressButton(int button); void boxAction(int box); private: boost::thread_group threads; }; void Board::pressButton(int button){ if(button=1){ threads.create_thread(&boxAction,1); } else ... } I have tried various different syntax within the create_thread() but have not been able to figure out from the documentation, or reading through the history of this mailing list, how to correctly do this. Any help you could give me would be greatly appreciated. Patricia Shaw