#ifndef __INTFAMILY__ #define __INTFAMILY__ #include using namespace std ; class IntFamily { private: int parent ; vector childList ; public: IntFamily(int Parent) // Creates family with no children { parent = Parent ; childList.clear() ; // is this needed? } IntFamily() // No children, Parent is 0 { IntFamily::IntFamily(0) ; } void addChild(int NewChild) // Adds new child to the family { childList.push_back(NewChild) ; } int getParent() const // Returns parent of family { return parent ; } int getSize() const // Returns size of family { return (int)childList.size() ; } int getChild(int I) const // Returns I'th child of family { return I<(int)childList.size() ? childList[I] : -1 ; } } ; ostream& operator<<(ostream&, const IntFamily&) ; #endif