-1
t_lista* Cria_Lista(int (*ptrFncEscreve)(void *ptrElemento))
{
t_lista *Lista;
Lista = (t_lista*) malloc (sizeof(t_lista));
Lista->qtde = 0;
Lista->ptrFncEscreve = EscreveInteiro;
return Lista;
}
t_nodeL* Cria_NoLista()
{
t_nodeL *No;
No = (t_nodeL*) malloc (sizeof(t_nodeL));//Se usa o tipo, e não a variavel
return No;
}
int Insere_InicioLi (t_lista *Lista, void *x)
{
t_nodeL *No = Cria_NoLista();
No->val = x;
No->Prox = Lista->inicio;
No->Ant = NULL;
No->Prox->Ant = No;
Lista->inicio = No;
Lista->qtde++;
return 1;
}
I can’t insert, what’s the problem?
You have to say what the problem is, young man. Are you making a mistake? Are you inserting it in the wrong place? Does the computer melt? Is there a voice from beyond screaming that something is wrong? Please be more specific.
– Jéf Bueno