summaryrefslogtreecommitdiff
path: root/number.h
diff options
context:
space:
mode:
authorOlivier Gayot <og@satcom1.com>2017-09-08 20:06:38 +0200
committerOlivier Gayot <og@satcom1.com>2017-11-19 14:00:59 +0100
commit589f8e2558d008c63892f2345b233e28d889620b (patch)
treef93c0989aabfea7fe46f9c06308e61ea883bc0e1 /number.h
parent671f3f8ca44382386daf63c70140742e61200c2e (diff)
Added the addition of two numbers
We're using the grade school addition method to compute the sum of two numbers of size n. Signed-off-by: Olivier Gayot <og@satcom1.com>
Diffstat (limited to 'number.h')
-rw-r--r--number.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/number.h b/number.h
index c508a81..ca5075e 100644
--- a/number.h
+++ b/number.h
@@ -9,6 +9,13 @@ public:
number() = default;
/**
+ * \brief Return the result of the addition of a number and this number.
+ *
+ * \param n The number to add to this number.
+ */
+ number operator+(const number &n) const;
+
+ /**
* \brief Tells whether the number passed as parameter is strictly less
* than this number.
*