View Single Post
Old 04-27-2004, 05:36 PM   #3 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
Quote:
Originally posted by joe_bruin
well, since you didn't post declaration of Car() and "i", i will speculate. you are trying to pass a function similar to this:

void Car(int i);

as the third argument of pthread_create. this is incorrect, don't do that.
What he does is perfectly legal as long as there is a "car function" taking a void * parameter and returns a void* exit status.

But if I remember correctly:
(void *) i
should be replaced by
&i
Assuming "i" is just an integer.
__________________
Valmont is offline   Reply With Quote