// File: IntNode.h // // HNode with int data // #ifndef INTNODE_H #define INTNODE_H #include #include "HList.h" using namespace std ; class IntNode : public HNode { public: IntNode(int data = 0) ; void print(ostream& os =cout) const ; IntNode *clone() const ; // OK to return IntNode ptr instead of HNode ptr bool operator==(const HNode& rhs_ref) const ; int get() const ; // not virtual! void set(int data) ; protected: // allows for future derivation int m_data ; } ; #endif