View Single Post
Old 01-31-2005, 09:36 AM   #4 (permalink)
ender
Code Monkey
 
ender's Avatar
 
Join Date: Mar 2003
Location: Evansville, IN
Posts: 75
ender is on a distinguished road
Send a message via AIM to ender Send a message via Yahoo to ender
Yes, the destructor looks ok now.

As for your constructor, you will not be able to use an initialization list in this case. Remember, the pointer just points. You have not set what it will be pointing to yet. Therefore you can't set the values to what it points to either. I hope I'm not giving it away.

Think about why you delete something (tmpPtr). Now think of another keyword that might shed some light on this. And you are correct that it will just 'point' to the head of the list, however this is still a pointer!

Doing great!

-Ted
__________________
while(1) fork();
ender is offline   Reply With Quote