:1.088KB : :1 :2022-08-26 18:01:24
大整数的实现(hugeint.cpp)如果开发者对于本文件有需要的可以参考。#ifndef HUGEINT_H
#define HUGEINT_H
#include
using std::ostream;
class HugeInt
{
friend ostream& operator<<(ostream&, const HugeInt&);
public:
HugeInt(long = 0);
HugeInt( const char * );
HugeInt operator ( const HugeInt & ) const;
HugeInt operator ( int ) const;
HugeInt operator ( const char * ) const;
bool operator==(const HugeInt&) const;
bool operator!=( const HugeInt & ) const;
bool operator<( const HugeInt & ) const;
bool operator<=( const HugeInt & ) const;
bool operator>( const HugeInt & ) const;
bool operator>=( const HugeInt & ) const;
HugeInt operator-( const HugeInt & ) const;
HugeInt operator*( const HugeInt & ) const;
HugeInt operator/( const HugeInt & ) const;
void output();
int getLength() const;
private:
int integer[40];
};
#endif
01-06C#大整数类BigInteger