//头插数据
void listtc(listnode* pead, CMMlet n) {
listnode* ps = listcj();
listnode* cur = pead->next;
pead->next = ps;
ps->prev = pead;
cur->prev = ps;
ps->next = cur;
ps->SZ = n;
}
测试结果
//头插数据
void listtc(listnode* pead, CMMlet n) {
listnode* ps = listcj();
listnode* cur = pead->next;
pead->next = ps;
ps->prev = pead;
cur->prev = ps;
ps->next = cur;
ps->SZ = n;
}
测试结果