⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hugeint.h

📁 该代码实现了256位的大数运算
💻 H
字号:
#ifndef HUGEINT1_H
#define HUGEINT1_H
#include<iostream.h>
//using std::ostream;
const int N=10;

class hugeint
{
	friend ostream & operator<<(ostream &,const hugeint &);
public:
	hugeint (int j=0);
//	hugeint()
//	{ label='+';}
	hugeint (const char *);
friend	hugeint operator+(const hugeint ,const hugeint );
        hugeint operator+(int);
friend	hugeint operator+(const hugeint ,const char *);


friend	hugeint operator-(const hugeint ,const hugeint );
        hugeint operator-(int);
friend	hugeint operator-(const hugeint ,const char *);

friend	hugeint operator*(const hugeint ,const hugeint );
        hugeint operator*(int);
friend	hugeint operator*(const hugeint ,const char *);

friend	hugeint operator/(const hugeint ,const hugeint );
        hugeint operator/(int);
friend	hugeint operator/(const hugeint ,const char *);

friend	hugeint operator%(const hugeint ,const hugeint );
        hugeint operator%(int);
friend	hugeint operator%(const hugeint ,const char *);


        hugeint operator=(const int);
 friend hugeint sqrt(hugeint);

friend  bool operator==(const hugeint ,const hugeint );
friend  bool operator==(const hugeint ,const int);
friend  bool operator<(const hugeint ,const hugeint );
friend  bool operator<(const hugeint,const int);
friend  bool operator<=(const hugeint ,const hugeint );
friend  bool operator<=(const hugeint ,const int);

private:
	short integer[N];
	char  label;
};
#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -