linked list source code errors
i recently was learning about linked lists using example code from this site.
here is the code:
i was wondering how / where do i edit this code so i can accept user input that then is placed in the list. i have tried various ways but it never works.
node *root; //This won't change, or we would lose the list in memory
node *conductor; //This will point to each node as it traverses
root=new node; //Sets it to actually point to something
root->next=NULL; //Otherwise it would not work well
conductor=root; //The conductor points to the first node
conductor->next=new node; //Creates a node at the end of the list
conductor=conductor->next; //Points to that node
conductor->next=NULL; //Prevents it from going any further
also where do i put the code to print out the linked list
i am very confused can anyone help me out please.
if(conductor!=NULL) //Makes sure there is a place to start