?? 算法5.12.txt
字號:
int CopyGList(GList ls1, GList *ls2)
{
if (!ls1) *ls2 = NULL; /*復制空表*/
else {
if (!(*ls2 = (Glist)malloc(sizeof(Glnode)))) return 0; /*建表結點*/
(*ls2)->tag = ls1->tag;
if (ls1->tag = = 0) (*ls2)->data = ls1->data; /*復制單元素*/
else {
CopyGList(&((*ls2)->ptr.hp), ls1->ptr.hp); /*復制廣義表ls1->ptr.hp的一個副本*/
CopyGList(&((*ls2)->ptr.tp) , ls1->ptr.tp); /*復制廣義表ls1->ptr.tp的一個副本*/
}
}
return 1;
}
算法 5.12
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -