From 6584ed7a4c5db4cf7f78b5de443c2d306842b58d Mon Sep 17 00:00:00 2001 From: Jinank Jain Date: Fri, 15 May 2015 00:40:30 +0200 Subject: [PATCH] Added %= --- bigint.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bigint.cpp b/bigint.cpp index 9b5fa16..c4e9ad8 100644 --- a/bigint.cpp +++ b/bigint.cpp @@ -162,7 +162,10 @@ struct bigint { void operator/=(const bigint &v) { *this = *this / v; } - + void operator%=(const bigint &v) { + *this = *this % v; + } + bool operator<(const bigint &v) const { if (sign != v.sign) return sign < v.sign;