hugeint.h
来自「该代码实现了256位的大数运算」· C头文件 代码 · 共 54 行
H
54 行
#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 + =
减小字号Ctrl + -
显示快捷键?