#ifndef _APSET_H #define _APSET_H template struct Node { itemType info; Node * left; Node * right; Node(const itemType & val, Node * lchild, Node * rchild) : info(val), left(lchild), right(rchild) { } }; template class apset { public: apset(); const apset & operator = (const apset & rhs); // accessors bool contains(const itemType & item) const; // is item in the set? void print(ostream & output) const; // print all items int size() const; // # elements in set // mutators void add(const itemType & item); // add item to set (no duplicates) void makeEmpty(); // empty it out void remove(const itemType & item); // operators const apset& operator *= (const apset & rhs); // intersection with const apset& operator += (const apset & rhs); // union with private: Node * find(Node * root, const itemType & item) const; // pointer in root to item void unionHelp(Node * rightRoot); void interHelp(apset & result, Node * leftRoot,Node * righRoot); Node * myRoot; int myCount; }; #include "apset3.cpp" #endif