// BigInt.h // BigInt stores an integer. // This version stores only non negative integers. // The integers may grow to very large size. The // vector that stores the integer grows to match // the size of the number. // If BigInt has not been initialized, it prints // its value as #UNK. // tom bailey 16 feb 00 #ifndef _BIGINT_H #define _BIGINT_H #include #include using namespace std; class BigInt { public: BigInt(); BigInt( long ); BigInt( const BigInt & ); BigInt operator+( const BigInt & ) const; const BigInt & operator+=( const BigInt & ); const BigInt & operator=( const BigInt & ); void print( ostream & ) const; private: bool known; vector digit; }; ostream & operator<<( ostream &, const BigInt & ); #endif // Notes: // No sign yet, only handles non-negative integers. // The value is known as soon as an assignment is made. // The value is unknown when the zero-parameters // constructor is used.