大佬求解
struct ele {int no;
struct ele *link;
}
h = u = (struct ele *)malloc(sizeof(struct ele));/*形成首表元*/
h->no = 1;
for (i = 2; i <= n; i++)/*形成其余的n-1个表元*/
{
u->link = (struct ele *)malloc(sizeof(struct ele)); //???此步如何将h->link指向u?????
u = u->link;
u->no = i;/*第i个表元置编号i*/
}
u->link = h;/*末表元后继首表元,形成环*/