Based on valgrind I believe my error stems from these guys because the error happens after I assign a new set to another set. Set Z -> A^B (intersection operation that returns a Set). I am just not sure what I did wrong, any help would be greatly appreciated!
Set::~Set()
{
Cap = 0;
Num = 0;
delete [] Pool;
Pool = NULL;
}
Set::Set(const Set &A)
{
Cap = A.capacity();
Num = A.size();
Pool = A.Pool;
}
Set& Set::operator=(const Set &X)
{
Cap = X.capacity();
Num = X.size();
Pool = X.Pool;
return *this;
}