for removing the last element from a chain in my linked list?
Action *temp = head; //Action is my node
while(temp != 0)
{
if(temp->link == tail) //tail is my last node
{
delete last;
tail = temp;
tail->link = 0;
return;
}
temp = temp->link;
}
I guess my real question is, will this leave any leaks behind, or cause me problems in the future use of my list? Thanks