#ifndef DISTANCE #define DISTANCE const bool VERBOSE = false; const int INCH_TO_FOOT = 12; const int FOOT_TO_YARD = 3; const int YARD_TO_MILE = 5280; class DistanceT{ public: DistanceT(); DistanceT(int inches); DistanceT(int feet, int inches); DistanceT(int yards, int feet, int inches); DistanceT(int miles, int yards, int feet, int inches); // a destructor ~DistanceT(); // something new. DistanceT(const DistanceT & other); // something else new DistanceT & operator = (const DistanceT & other); DistanceT Add(const DistanceT & other) const; // something else new. DistanceT operator + (const DistanceT & other) const; // this is an inline function int Inch(void) const { return inch;}; int Foot(void) const { return foot;}; int Yard(void) const { return yard;}; int Mile(void) const { return mile;}; std::string DistanceString(void) const; private: void Reduce(void); void Reset(void); void CopyData(const DistanceT & other); std::string Cat(int measure, std::string name) const; int inch, foot, yard, mile; }; #endif