From 6beca4c34506edfc51cb3fd9cd3a2e895d6932e0 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 27 Nov 2017 11:16:46 +0100 Subject: Added the multiplication assignment operator Signed-off-by: Olivier Gayot --- number.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'number.cpp') diff --git a/number.cpp b/number.cpp index 074c4dc..02d655d 100644 --- a/number.cpp +++ b/number.cpp @@ -315,6 +315,14 @@ number::operator+=(const number &n) return *this; } +number & +number::operator*=(const number &n) +{ + *this = *this * n; + + return *this; +} + number & number::operator<<=(std::uint32_t n) { -- cgit v1.2.3