下你所需,载你所想!
汇集开发技术源码资料

大整数的实现(hugeint.cpp)

: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

热门推荐

相关文章