strutto *head,*cdm;
head=&a;
cdm=head;
a.next=&b;
b.next=&c;
c.next=NULL;
do{
printf("%dn",cdm->dato);
cdm=cdm->next;
} while(cdm!=NULL);
free(a);
free(b);
free(c);
I’m getting this error while trying to free the lists error: incompatible type for argument 1 of ‘free’|
The stdlib its already included
New contributor
Valentin Constantin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.