Failing to understand pointers?

I have a vector of Linked list pointers.

Each LinkedList has a head pointer which is a pointer to a Node. That node of course is the head of the list.

The head of vector[3] is the same as the head of vector[0].
I change the head pointer of vector[0] to point to the same node that vector[1] points to, or the head of vector[1].

However the head pointer of vector[3] never changes. How can I get it so that by changing the head pointer of vector[0] I can also change the head pointer of vector[3] as well?
I have tried 2 different methods. None have worked.

vector[0]->head=vector[1]->head;
*(vector[0]->head)=*(vector[1]->head);

How is your list implemented? I'd expect the second line to do what you wanted.
Topic archived. No new replies allowed.