LinkedListPointer problem?

I'm trying to use LinkedListPointer and specifically getLast()


It always seems to return null;


I'm looking at


while (l->item != nullptr) l = &(l->item->nextListItem);

shoud that be...


while (l->item != nullptr && l->item->nextListItem !=nullptr)  

l = &(l->item->nextListItem);

getLast() can't return null - it returns a reference not a pointer!

Ok tnx, yea, I see what I was assuming.  (I was assuming the last "item" would be returned)