QUOTE(realNoName @ 11 Dec, 2006 - 05:08 PM)

i have been playing with linkedlist and i got most of work but haveing a problem with trying to find an item then delete it
This is what i have but when i call it it errors out
CODE
template<class T>
LinkList<T> & LinkList<T>::removeItem(T item)
{
node * walker = start;
node * backStep = start;
if(walker->data == item)
{
start = walker->link;
delete walker;
size--;
// return *this;
}
while(walker != NULL)
{
if(walker->data == item)
{
backStep->link = walker->link;
delete walker;
size--;
// return *this;
}
backStep = walker;
walker = walker->link;
}
return *this;
}
Hi
Thanks for the code. IN isolation and without the errors, its not enough to give you the bes response. Can you tell us the errors too?
thanks