hi , i'm having a problem with pointers in C ...
I will give a simple example inspired from my problem :
Code:
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 . and xx =yy must be done in a function , not in main .
10x