?? li0943.cpp
字號:
//例9.43 鏈表各算法測試函數
//Li0943.cpp
#include <iostream.h>
#include "node_def.h"
#include "create.h"
#include "print_search.h"
#include "delete.h"
#include "insert.h"
#include "deletechain.h"
#include "create_sort.h"
void main( )
{
node *head;
int num;
head=Create( ); //建立一條無序鏈表
Print(head); //輸出鏈表
cout << "輸入待刪除結點上的整數:\n";
cin >> num;
head=Delete_one_node(head, num);
Print(head); //刪除一個結點后,輸出鏈表
cout << "輸入要查找的整數:\n";
cin >> num;
if(Search(head, num)!=NULL)
cout<<num<<" 在鏈表中\n";
else
cout<<num<<" 不在鏈表中\n";
Delete_chain(head); //釋放上述鏈表空間
head=Create_sort( ); //建立一條有序鏈表
Print(head); //輸出鏈表
Delete_chain(head); //釋放有序鏈表空間
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -