Added to_string for fractions
This commit is contained in:
@@ -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
|
struct Node
|
||||||
{
|
{
|
||||||
Fraction value;
|
Fraction value;
|
||||||
|
|||||||
Reference in New Issue
Block a user