The problem is with the third argument in *pthread_create(&thread1,NULL,(void*)sender,(void*)0);* * * It should just be sender or &sender.
*pthread_create(&thread1,NULL,sender,(void*)0);* Thanks, Senthil. On Mon, Mar 26, 2012 at 5:25 PM, Sagar Pareek <sagarpar...@gmail.com> wrote: > Hello all, > I need help regarding thread implementation in C++ > > Here is my sample code... > > *class TraCISagar : public BasicModule1 { > public: > . > . > void activity(); > void* sender(void*); > . > . > }; > > void* TraCISagar::sender(void* a) > { > . > . > . > } > > void TraCISagar::activity() > { > pthread_t thread1; > . > . > pthread_create(&thread1,NULL,(void*)sender,(void*)0); //problem coming > here > . > . > pthread_join(thread1,NULL); > } > > int main() > { > . > . > . > . > }* > > And error is invalid use of member (did you forget the ‘&’ ?) > Do anyone of you know how to solve it? > > > -- > **KIND REGARDS -- > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.