Hi,
I struggled on something; here is the question;
I have a struct that contains some items and a pointer; I call this node;
I have another node in same struct and also have a pointer.
Now these two nodes are linked with a next pointer just as you know as linked list.
I want to do move to another linked list from the first one. (temp is a struct pointer)
It is ok, but when I want to do this with a function;Code:temp=firstnode; temp=temp->next;
it fails, what am I missing? Isnt it already a "call by referance"? why doesnt temp move another node?Code:void myfunction(mystruct *tmp) { tmp=tmp->next; } ... .. myfunction(temp); //in main(), call the function
Thanks in advance.