|
-
Dec 8th, 2003, 06:54 AM
#2
Much better 
Head and Tail should be private or protected. protected if you want to derive classes.
If you derive publicly, make the destructor virtual.
The destructor's purpose is to make sure that no nodes remain. It should go through the list and delete every node.
The data parameters should be const references if you've learned about them. Both Pop and Poke have control paths that don't return values (if Head == NULL), they should do something. Return a default object or, better, throw an exception.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|