?? set.cpp
字號:
#include"common.h"
#include"orderlist.h"
#include"orderset.h"
void main( ){
OrderedSet S1,S2,T1,T2,T3;
cout<<endl<<"Input S1: "; //構造集合S1
CreateSet(S1);
cout<<endl<<"Input S2: "; //構造集合S2
CreateSet(S2);
PrintSet(S1);
PrintSet(S2); //顯示集合S1及S2
Union(T1,S1,S2); //對集合作并、交、差運算,顯示結果
cout<<endl<<"Union: ";
PrintSet(T1);
Intersection(T2,S1,S2);
cout<<endl<<"Intersection: ";
PrintSet(T2);
Difference(T3,S1,S2);
cout<<endl<<"Difference: ";
PrintSet(T3);
DestroySet(T1); //銷毀各集合
DestroySet(T2);
DestroySet(T3);
DestroySet(S1);
DestroySet(S2);
cout<<endl<<"THE END"<<endl;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -