Computer Science Canada Circular linked list help |
Author: | imbored [ Fri Jan 01, 2010 5:10 pm ] | ||
Post subject: | Circular linked list help | ||
What is it you are trying to achieve? make a circular linked list. and make the delete procedure stop when there is only one item left in the list. I am suppose to make it a circular linked list that holds the user input and then afterwards delete some until one is left. Also a backup of the list is needed of the original inputs. and when the program is finish running, it would display the original inputs and the one last remaining input. but mainly i am trying to get it as a circular linked list. ps: if it is circular does that means it loops over and over again from the top to the bottom and back to top. how do i stop it from going to infinite loop when i am deleting and displaying. What is the problem you are having? i dont understand how to link the ending of the linked list back at top. Describe what you have tried to solve this problem read guides and stuff. this code is just an edited version of a code in the guide. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Edit: i got the backup working. i just made a new procedure called backup with the same code as insert and put into a new array. but i notice one thing that is not working as i thought. you cannot put first and last name at one time because it counts it as two names. (labels) and thats not good... |
Author: | andrew. [ Mon Jan 04, 2010 9:06 pm ] |
Post subject: | RE:Circular linked list help |
Can't you put "get newLabel.name : *"? It should take in the spaces and everything up until 20 characters (because you set it to that). I haven't tried it though, but it should work. |
Author: | imbored [ Mon Jan 04, 2010 9:29 pm ] |
Post subject: | RE:Circular linked list help |
yea i fixed that now thats why i opened a new thread because i totally re-programmed because this program is confusing for me. |