資源簡介
這是我們老師自己編的,在vc++6.0上完全可以運行,很不錯的

代碼片段和文件信息
#include?
#include?“CircList.h“
using?namespace?std;
int?main(){
CircList?list;
ifstream?fin(“l(fā)ist.txt“);
assert(fin);
fin?>>?list;
cout?<“The?initial?list?in?the?file?is:\n“?< list.Inverse();
cout?<“Inverse?the?list?then?the?list?is:\n“?<
cout?<“========================================\n“;
int?i?elem;
cout?<“Test?the?Insert?Remove?and?Search?function:\n“;
cout?<“Each?test?will?terminate?by?an?invaid?input.“;
cout?<“\n----------------------------------------\n“;
cout?<“1.?Test?the?Insert(int?i?T?&elem):\n“;
while?(1){
cout?<“Input?the?index?i?and?data?elem?to?insert:?“;
cin?>>?i?>>?elem;
if?(!cin){//流不正常
cin.clear();//恢復(fù)正常
cin.ignore(100‘\n‘);
break;
}
if?(i?0) break;
if?(list.Insert(i?elem))?cout?<“Insert?successful!\n“;
else cout?<“Insert?failed!\n“;
}
cout?<“\nAfter?inserted\n“?<
cout?<“----------------------------------------\n“;
cout?<“2.?Test?the?Remove(int?i?T?&elem):\n“;
while?(1){
cout?<“Input?the?index?i?in?which?you?want?to?remove:?“;
cin?>>?i;
if?(!cin){
cin.clear();
cin.ignore(100‘\n‘);
break;
}
if?(i?0) break;
if?(list.Remove(i?elem)) cout?<“The?element?“?< else cout?<“Remove?failed!\n“;
}
cout?<“\nAfter?removed\n“?<
cout?<“----------------------------------------\n“;
cout?<“3.?Test?the?Search(T?&elem):\n“;
while?(1){
cout?<“Input?the?element?you?want?to?search:?“;
cin?>>?elem;
if?(!cin){
cin.clear();
cin.ignore(100‘\n‘);
break;
}
if?(elem?0) break;
CirclinkNode?*p?=?list.Search(elem);
if?(p) cout?<“The?element?“?< else?cout?<“The?element?is?not?exist!\n“;
}
cout?<“\n----------------------------------------\n“;
cout?<“End?test!“?< return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????19900??2009-03-16?08:06??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch02_LinerList.rar
?????文件??????22169??2009-03-16?08:08??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch03_Stack_Queue.rar
?????文件??????16680??2009-03-26?20:58??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch04_Array_String_GenList.rar
?????文件??????31159??2009-04-12?22:58??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch05_Tree.rar
?????文件??????11396??2009-04-06?15:58??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch06_Set.rar
?????文件??????45875??2009-05-27?07:32??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch07_Search.rar
?????文件??????34891??2009-05-06?13:41??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch08_Graph.rar
?????文件??????24006??2009-05-11?15:02??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort.rar
?????文件?????????41??2007-12-29?23:43??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\WinnerTree\data.txt
?????文件????????713??2009-05-06?18:56??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\WinnerTree\main.cpp
?????文件????????740??2009-05-06?18:47??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\WinnerTree\TournamentSort.h
?????文件???????4460??2009-05-06?18:57??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\WinnerTree\WinnerTree.dsp
?????文件????????545??2009-05-06?18:43??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\WinnerTree\WinnerTree.dsw
?????文件???????2799??2009-05-06?18:47??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\WinnerTree\WinnerTree.h
?????文件???????1865??2009-05-08?09:08??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\Staticli
?????文件???????4463??2009-05-06?18:23??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\Staticli
?????文件????????557??2009-05-06?18:11??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\Staticli
?????文件???????4841??2009-05-08?09:07??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\Staticli
?????文件??????10917??2009-04-29?08:57??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\BST.h
?????文件???????2960??2009-05-06?16:41??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\dataList.h
?????文件???????3390??2009-05-11?14:53??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\main.cpp
?????文件???????4588??2009-05-06?13:58??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\MySort.dsp
?????文件????????537??2009-05-06?13:56??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\MySort.dsw
?????文件???????9052??2009-05-11?15:00??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\MySort.h
?????文件???????3017??2009-05-06?13:55??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\person.h
?????文件????????468??2009-05-11?14:58??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\persons.txt
?????文件???????1689??2009-03-13?19:35??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\SeqStack.h
?????文件??????50176??2010-06-09?16:55??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\MySort.ncb
?????文件??????53760??2010-06-09?16:55??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\MySort\MySort.opt
?????文件???????4428??2009-05-06?13:56??數(shù)據(jù)結(jié)構(gòu)類庫源代碼\ch09_Sort\dataList\dataList.dsp
............此處省略262個文件信息
評論
共有 條評論