aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d355694..91accad 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -75,6 +75,13 @@ struct Fraction
}
};
+std::string to_string(const Fraction &f)
+{
+ std::stringstream ss;
+ ss << f.numerator << "/" << f.denominator;
+ return ss.str();
+}
+
struct Node
{
Fraction value;