Well I feel like the computer labs in Thornborough have become my second home, I'm posting from there right now, it seems that if im not at work or in class I'm in the lab. Occasionally I do go home to sleep but thats about it. It is wreaking havok(sp on purpose not as a pun but just as a reference since X3 is so recent, anyways) on my diet
(
Read more... )
Comments 9
Is this for an assignment, or for the real world?
Reply
Our prof has explained 2 ways of making a contiguous list
1. an array where each element has a next and previous int that refer to nodes in the array.
2. an array with each element in order in the array, and when you insert or delete an element you move every element after it up or down one node.
I chose the second method as it seemed easyer to code the functions.
Reply
Reply
Reply
Reply
Reply
A) Calloc'ing inside an if statement is bad style. =( Makes it harder to read.
B) Are you sure the problem isn't just the new.element things? I find sometimes switching them to new->element, or new->(*element) or something solves that. Maybe I just don't understand the problem.
Reply
Reply
Reply
Leave a comment