int N; EDGE **e = NULL; int i; e = (EDGE **)malloc(N*sizeof(EDGE *)); for( i=0 ; inTo = nTo; eptr->nWeight = nW; eptr->next = e[nFrom]; e[nFrom] = eptr;