Well, first I'm not sure what your saying but here is the basic concept of your list.
Originally Posted by andrewh
root is the head or the first node of your list.
You then set conductor to point to root( the head of the list).
The only purpose of the conductor is to traverse the list so you can access elements other than the head.
Now for your question,
There is no way to reverse the direction of a pointer in c++. But you can get you desired effect by adding a previous pointer to the list.
How do I travel in reverse on pointers?
this is known as a doubly linked list.
Now you can rebuild your list like this
Now when you add a new node, you just have to link the previous pointer as well -
root = new node;
root->next = 0;
root->prev = 0;
root->x = 12;
cout<< "The Root Node Value is = " << root->x <<endl;
conductor = root;
Now you, have access to both the previous and next node in the list and the ability to walk the list in both directions.
// 2nd Node Geneartion
conductor->next = new node;
conductor = conductor->next;
conductor->next = 0;
conductor->prev = root;
conductor->x = 42;
cout<< "The 2nd Node Value of X is = " << conductor->x <<endl;