Hi,
What can I create a list?
I would like to know how to insert items in a list.
I wrote this code
void addElem(lista *&head, int elemento){
if(temp == NULL){
head=new lista;
head->value=elemento;
head->link=NULL;
temp=head;
}else
{
lista *new_node=new lista;
while(temp != NULL){
temp=temp->link;
}
new_node->value=elemento;
new_node->link=NULL;
temp=new_node;
}
}
Why does stamp only first value?
thanks!