谁能帮我把那程序写出来?用c++程序写的

来源:百度知道 编辑:UC知道 时间:2024/06/06 17:44:01
题目是这样的:
设计一个具有交,并等功能的的类,要用数组和链分别做一个,就是输入两个数组,求他们的交并集,输出也是两个数组!!输出的两个数组一个是交的情况,另一个是并的!输出的时候最好像菜单一样!
就是像下面
请输入一个数组:
请输入另一个数组:
做的好的另外加100,要能直接运行的,最好输入数组的字数个数不限,要输几个就几个,能不能直接在一个文件里面把所有的程序都包括了!

/******************************************
this class aimed to build an array can store T type elements\
and no matter how large the array will be!
However, for simple ,i only take the exmples of double ,but in fact
this array class can deal with string,int,char,and any other types
you defined yourself!
how to use?(input the elements separate with',' and ended with ';'
Examples:
input the first array:
12,13,14,15;
input the second array:
14,15,16,17,18;
the first array is :
the vector members:
12 13 14 15
the List members:
12 13 14 15
the second array is :
the vector members:
14 15 16 17 18
the List members:
14 15 16 17 18
the intersection of these two arrays:
the vector members:
14 15
the List members:
14 15
the combination of these two arrays: