Galera look at this code:
lista
is struct
lista * crialista()
{
lista *li;
li = (lista *) malloc(sizeof(struct lista));
if(li !=NULL)
{
li->qtd = 0 ;
}
}
Why was lista
allocated to li
with malloc
? li
was declared as lista
, this no longer gives access to members of my struct
lista
?