From 44542adf023315d60a8ffc4863f2b161b3c1eb90 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 15 Apr 2013 23:45:48 -0600 Subject: Addition, subtraction, and multiplication work now Division isn't working yet, there are too many options, I'll figure out something eventually :-P --- src/number.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/number.h') diff --git a/src/number.h b/src/number.h index 4ada829..1489623 100644 --- a/src/number.h +++ b/src/number.h @@ -11,19 +11,28 @@ public: Number( const Bu::String &sData, int iOrd=0 ); virtual ~Number(); + Number &operator=( const Bu::String &sNum ); Number operator+( const Number &rhs ) const; + Number operator-( const Number &rhs ) const; + Number operator*( const Number &rhs ) const; + + void set( const Bu::String &sNum ); operator Bu::String() const { return aInt.toString(); } - Bu::String toString() const { return aInt.toString(); } + Bu::String toString() const; int digit( int iOrder ) const; +private: + Number add( const Number &rhs, bool bSub ) const; + private: int iOrd; + bool bPositive; PackedIntArray aInt; }; -- cgit v1.2.3