Tuesday, March 27, 2007

March 29

A. Objective: Continue working on sorting my linked list.

B. Program:
This link contains the .h .cpp and my output:
All-in-one

This is my cpp file:
.Cpp file

This is my .h file:
.h file

C. Comment: Thanks to Abishek's comment, I was able to sort my original list. However, I decided to add another node to my list and now the new node doesn't sort properly. I don't know what I did or what I haven't done to cause this problem. It seems everytime I add something new, the original has to break down.

1 comment:

Grayson said...

Ava,
Your problem arises when you have to put a node at the beginning of the list. Draw this process out, and let me know if you have any questions. :)
- Grayson