I will give a simple example inspired from my problem :
void change(int *x, int *y){x=y;}
int main(){
int *xx,*yy;
yy = (int*)malloc(sizeof(int));
change(xx,yy);
if(xx == NULL)printf("is null\n");
else printf("---- %d ----\n",*xx);
.................................................. .........
xx doesn't point to the value of yy (*yy) , the program prints "is null" . Why ?
xx and yy must be declared int* , it's something that i must do in my program .