正在加载图片...
// Definition of a Key class class Keyt public. // Add any constructors and methods for key data. private. // Add declaration of key data members here l Declare overloaded comparison operators for keys. bool operator==(const Key &x, const Key &y bool operator >(const Key &x, const Key &y bool operator<(const Key &x, const Key &y bool operator >=(const Key &x, const Key &y bool operator <=(const Key &x, const Key &y) bool operator !=(const Key &x, const Key &y); Definition of a record class: class recordi public. Key Keyo; / implicit conversion from Record to Key. l Add any constructors and methods for record objects. private: // Add data components 西川大学计算机(软件)学院四川大学 计算机(软件)学院 // Definition of a Key class: class Key{ public: // Add any constructors and methods for key data. private: // Add declaration of key data members here. }; // Declare overloaded comparison operators for keys. bool operator ==(const Key &x, const Key &y); bool operator > (const Key &x, const Key &y); bool operator < (const Key &x, const Key &y); bool operator >=(const Key &x, const Key &y); bool operator <=(const Key &x, const Key &y); bool operator !=(const Key &x, const Key &y); // Definition of a Record class: class Record{ public: Key Key(); // implicit conversion from Record to Key. // Add any constructors and methods for Record objects. private: // Add data components. };
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有