Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Venix Cador
- //Cs23001
- //02/10/2013
- #ifndef BIGINT_HEADER
- #define BIGINT_HEADER
- #include<iostream>
- const int MaxValue = 100;
- class bigint
- {
- public:
- bigint();
- bigint(int);
- bigint(const char[]);
- bool operator ==(const bigint&);
- bool operator ==(int);
- bool operator ==(const char[]);
- bool operator != ( const bigint& rhs) { return !(*this == rhs);};
- int operator[](int);
- int operator[](int) const;
- bigint operator+(bigint) const;
- void output(std::ostream&) const;
- void times_single_digit(const int );
- bigint operator*(bigint) const;
- void times10(const int);
- bigint operator*(const bigint& rhs);
- bigint factorial() const;
- private:
- int big[MaxValue];
- int size;
- void zero();
- };
- std::istream& operator >>(std::istream&, bigint&);
- std::ostream& operator <<(std::ostream&,const bigint&);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment