scusa per la fretta ho copiato male
codice:
struct elemento *FUSIONE(struct elemento *L1,struct elemento *L2,
struct elemento *testa)
{
struct elemento *app;
if ((L1!=NULL)||(L2!=NULL))
{
if (testa==NULL)
{
testa=(struct elemento *)malloc(sizeof (struct elemento));
app=testa;
}
else
if (L1!=NULL)
{
app->inf=L1->inf;
app=app->next;
app=(struct elemento *)malloc(sizeof (struct elemento));
if (L2!=NULL)
{
app->inf=L2->inf;
app=app->next;
app=(struct elemento *)malloc(sizeof (struct elemento));
}
return FUSIONE(L1->next,L2->next,app);
}
else
{
app->inf=L2->inf;
return FUSIONE(NULL,L2->next,app);
}
}
else
{
app=NULL;
return testa;
}
}
il codice mi va in loop