diff --git a/templates/BigInt.h b/templates/BigInt.h index 616d177b..2402c5b0 100644 --- a/templates/BigInt.h +++ b/templates/BigInt.h @@ -7,9 +7,8 @@ class BigInt { int sign; std::string s; - BigInt() { - s = ""; - } + BigInt() + : s("") {} BigInt(std::string x) { *this = x; @@ -44,6 +43,10 @@ class BigInt { return (s == x.s && sign == x.sign); } + bool operator!=(const BigInt& x) const { + return (s != x.s || sign != x.sign); + } + bool operator<(const BigInt& x) const { if (sign != x.sign) { return sign < x.sign;