#include
#include
#include
#include
struct node
;typedef struct node node;
typedef struct node * link;
void create(link *head)
}void insert(link head,link new_node)
}/******插入******/
void input(link *head)
}/******顯示******/
void display(link head)
printf("┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻ ┻\n");
}/******查詢******/
void search(link head)
}n = 1;
while(p->next != null)
if(flag)
p = p->next;
} if(!flag1)
printf("未查找到相關資訊,請確認輸入內容是否有誤!\n");
}/******刪除******/
void delete(link head)
}n = 1;
while(p->next != null)
if(flag)
else
printf("刪除成功!\n");
}else
printf("該聯絡人未刪除。\n");
}p = p->next;
}if(!flag1)
printf("未查找到相關資訊,請確認輸入內容是否有誤!\n");
}/******修改******/
void revise(link head)
}n = 1;
while(p->next != null)
if(flag)
}p = p->next;
} if(!flag1)
printf("未查找到相關資訊,請確認輸入內容是否有誤\n");
}/******清空******/
void empty(link head)
else
}printf("清空通訊錄成功!\n");
}else
printf("通訊錄未清空!\n");
}/******排序******/
void arrange(link head)
p2 = p2->next;
} p1 = p1->next;
}printf("排序成功!\n");
}int main()
}return 0;
}
鍊錶通訊錄
include include include define password 208140119 define name max 20 define gender max 10 define str max 20 define tel max 20 鍊錶結構 struct address type...
鍊錶通訊錄
include include include include include struct addressbook typedef struct addressbook addressbook typedef struct addressbook link int main menu void a...
利用鍊錶實現通訊錄
用鍊錶實現乙個 可以用來儲存資訊的通訊錄,每個人的資訊包括 姓名 性別 年齡 住址 程式如下 include include include define len sizeof struct student struct student void menu 目錄格式 struct student c...