diff --git a/app/common/rational.h b/app/common/rational.h index 73c839c81..4701e1e0a 100644 --- a/app/common/rational.h +++ b/app/common/rational.h @@ -25,6 +25,7 @@ extern "C" { #include } +#include #include #include @@ -127,6 +128,13 @@ public: QString toString() const; + friend std::ostream& operator<<(std::ostream &out, const rational &value) + { + out << value.r_.num << '/' << value.r_.den; + + return out; + } + private: void FixSigns(); void Reduce();