📄 hugeint.h
字号:
/////////////////////////////////////////////////////////////////////
//
// Module name:
// CHugeInt class
//
// Description:
// An abstraction of large integer.
// Only add and multiple operations are supported.
//
// created by LiangHL 2007.4.12
//
/////////////////////////////////////////////////////////////////////
#if !defined(AFX_HUGEINT_H__C1E779B3_80FD_4888_854A_7BFE3C2AC461__INCLUDED_)
#define AFX_HUGEINT_H__C1E779B3_80FD_4888_854A_7BFE3C2AC461__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <vector>
using namespace std;
class CHugeInt
{
public:
CHugeInt();
CHugeInt(int iSrc);
CHugeInt(const CHugeInt& hiSrc);
virtual ~CHugeInt();
void Zero();
CHugeInt& Add(int iOperand);
CHugeInt& Multiple(int iOperand);
CHugeInt& operator = (int iOperand);
CHugeInt& Add(const CHugeInt& hiOperand);
CHugeInt& Multiple(const CHugeInt& hiOperand);
CHugeInt& operator = (const CHugeInt& hiOperand);
// console print
void Output();
protected:
void AddSmall(int iIndex, int iValue);
void Add(int iIndex, int iValue);
protected:
static const int m_ciWeight;
protected:
vector<int> m_vecData;
};
#endif // !defined(AFX_HUGEINT_H__C1E779B3_80FD_4888_854A_7BFE3C2AC461__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -