?? 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 + -