结构体:
struct DulNode{
int a;
struct DulNode * next;
};
/*中间是建循环链表和对链表其他操作的代码*/
void del(struct DulNode * s)
{
struct DulNode *q, *p1, *p2;
//q是搜索s前驱的前驱,p1是搜索s前驱,p2是搜索s
q = s;
p1 = q->next;
p2 = p1->next;
while(p2 != s)
{
p2 = p2->next;
p1 = p1->next;
q = q->next;
}
q->next = p2;
delete(p1);
}