Re: [algogeeks] Need help regarding threads

2012-04-01 Thread Sagar Pareek
It was telling that error after doing some modifications... Yeah i think bharat u r saying correct... I will try it... Thanks for reply... On Sat, Mar 31, 2012 at 11:45 AM, bharat b bagana.bharatku...@gmail.comwrote: u should get an error: argument of type ‘void* (TraCISagar::)(void*)’ does

Re: [algogeeks] Need help regarding threads

2012-03-31 Thread bharat b
u should get an error: argument of type ‘void* (TraCISagar::)(void*)’ does not match ‘void* (*)(void*)’ ... The function which is threaded should be either static or global in pthread implementation ... On Tue, Mar 27, 2012 at 7:20 PM, Sagar Pareek sagarpar...@gmail.com wrote: Thanks for reply

Re: [algogeeks] Need help regarding threads

2012-03-27 Thread Sagar Pareek
Thanks for reply but tell me two thing , is it true or not? is NULL is not equal to (void*)0 ?? AND int a=20; int b=(int)a ; // Whats wrong in here?? Similarly for void * TraCISagar::sender(void* a); then while calling in pthread as pthread_create(thread1,NULL,(void*)sender,NULL) instead of

[algogeeks] Need help regarding threads

2012-03-26 Thread Sagar Pareek
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()

Re: [algogeeks] Need help regarding threads

2012-03-26 Thread SAMM
I think is error is in the 4th argument u r passing in this line * pthread_create(thread1,NULL,(void*)sender,(void*)0);* The 4th argument is expecting the address of the arguments , but the address he is getting is 0 , which is not granted by OS . Tht address is used by OS I guess . Instead*

Re: [algogeeks] Need help regarding threads

2012-03-26 Thread Senthil Nathan
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

Re: [algogeeks] Need help regarding threads

2012-03-26 Thread SAMM
Yaa Senthil is right , I overlooked it . In 3rd argument also it is expecting an address while u r passing the pointer . -- 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