Hello !! I'm coding an ADT for set.
template <typename elem>
class Set
{
public:
Set();
~Set();
void add(const elem & e);
int length();
bool exist(const elem & e) ;
void union(Conjunto<elem> & conj2);
elem getelem(int pos);
Set(const Set<elem> & other);
Set<elem> & operator=(const Set<elem> & other);
private:
vector<elem> conj;
Does anybody know how to make the assignment operator ?
I think it goes a little somehting like this, but i don't know what I'm supposed to do in the middle...
Assuming that your set only contains a std::vector, you do not need to implement the assignment operators. Default them, or use the implicitly defined ones.