public: dataNode(const K x, const E e) key (x), other(e)i 构造函数 getKey( const{ return key;}读取关键码 void setKey(Kx){key=x;}∥修改关键码 private: k key /关键码域 E other: ∥其他域(视问题而定)public: dataNode (const K x, const E e) : key(x), other(e) { } //构造函数 K getKey() const { return key; } //读取关键码 void setKey (K x) { key = x; } //修改关键码 private: K key; //关键码域 E other; //其他域(视问题而定) }; 7