void List::remove_last()
{
if(first == NULL)
{
first -> data = ' ';
}
else
{
Node *newnode;
newnode = new Node;
newnode = NULL;
newnode -> data = last -> back -> data;
last = newnode;
}
}
am I doing something wrong? I'm trying to remove the end of list node.