- Jun 16, 2000
- 30,213
- 12
- 81
LinkedList<Mail> *ptr1 = Mail1->get_previous_node();
LinkedList<Mail> *ptr2 = Mail2->get_previous_node();
if(ptr1 != Mail2 && ptr2 != Mail1)
{
if(ptr1 != NULL)
ptr1->link(Mail2);
in a list where Mail1 is the first...thus ptr1 being NULL...it works fine right up until that last if statement. How does the line
if(ptr1 != NULL)
change ptr1 to point at Mail2 instead????
LinkedList<Mail> *ptr2 = Mail2->get_previous_node();
if(ptr1 != Mail2 && ptr2 != Mail1)
{
if(ptr1 != NULL)
ptr1->link(Mail2);
in a list where Mail1 is the first...thus ptr1 being NULL...it works fine right up until that last if statement. How does the line
if(ptr1 != NULL)
change ptr1 to point at Mail2 instead????
