#ifndef DEF_ZFRACTION #define DEF_ZFRACTION #include #include using namespace std; class ZFraction{ public: ZFraction(int a=1, int b=1); ZFraction operator+(const ZFraction& x) const; ZFraction& operator+=(const ZFraction& x); ZFraction operator*(const ZFraction& x) const; ZFraction& operator*=(const ZFraction& x) const; private: friend ostream& operator<<(ostream& o, const ZFraction& f); int _a; int _b; }; #include "ZFraction.cpp" #endif