1 位向量的数据结构与一些操作 class VecSet { int* contain; int size; public: VecSet():contain(NULL),size(0){} VecSet(int maxsize); void Add(int add); //向集合中添加元素 void Del(int del); //删除集合中的元素 void MakeEmpty(); //清空集合 int GetSize(){return size;} int GetAt(int index); VecSet& operator +(VecSet& another); //A并B VecSet& operator -(VecSet& another); //A-B VecSet& operator *(VecSet& another); //A交B VecSet& operator =(VecSet& another); bool operator ==(VecSet& another); void Print(); // friend ostream& operator<<(ostream& stream,VecSet&set); }; 2 实现 VecSet::VecSet(int maxsize) { assert(maxsize>0); size=maxsize; contain=new int[size]; for(int i=0;i<size;i++) { contain[i]=0; } } void VecSet::Add(int add) { assert(add>=0&&ad