Código JAVA:
Ver original
int afegirInici(struct LEnters *pinici, int num){ struct LEnters *aux; aux=(struct LEnters *)malloc(sizeof(struct LEnters)); if(aux==NULL) return 1; aux->info=num; aux->seg=pinici; pinici=aux; printf("%p\n", aux); printf("%d - %p \n", aux->info, pinici); return 0; } void main(){ struct LEnters *LEnter=NULL; int num; num=4; printf("Correcte?: %d\n",afegirInici(LEnter,num)); }