I'm creating a thread in C but it passes the reference instead the value.
for (i=0; i<num_thread; i++){
pthread_create(&thread[i], NULL, mou_oponent,(void *)&i);
}
int mou_oponent(void* ind) //THIS IS THE HEADER OF THE FUNCTION
I need the value not the reference, because I take the value of i in the thread but it is changed because the for increments it.