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

📄 bigint.h

📁 有关长整形数据的相关问题
💻 H
📖 第 1 页 / 共 2 页
字号:
	CBigInt operator <<(int nBits) const;
	CBigInt operator >>(int nBits) const;

// Logical Operators
	bool operator !=(const CBigInt& Value) const;
	bool operator !=(int Value) const { return operator !=(CBigInt(Value)); }
	bool operator !=(unsigned int Value) const { return operator !=(CBigInt(Value)); }
	bool operator !=(long Value) const { return operator !=(CBigInt(Value)); }
	bool operator !=(unsigned long Value) const { return operator !=(CBigInt(Value)); }
	bool operator !=(const __int64 &Value) const { return operator !=(CBigInt(Value)); }
	bool operator !=(const unsigned __int64 &Value) const { return operator !=(CBigInt(Value)); }

	friend bool operator !=(int A, const CBigInt &B) { return CBigInt(A).operator !=(B); }
	friend bool operator !=(unsigned int A, const CBigInt &B) { return CBigInt(A).operator !=(B); }
	friend bool operator !=(long A, const CBigInt &B) { return CBigInt(A).operator !=(B); }
	friend bool operator !=(unsigned long A, const CBigInt &B) { return CBigInt(A).operator !=(B); }
	friend bool operator !=(const __int64 &A, const CBigInt &B) { return CBigInt(A).operator !=(B); }
	friend bool operator !=(const unsigned __int64 A, const CBigInt &B) { return CBigInt(A).operator !=(B);  }

	bool operator ==(const CBigInt& Value) const;
	bool operator ==(int Value) const { return operator ==(CBigInt(Value)); }
	bool operator ==(unsigned int Value) const { return operator ==(CBigInt(Value)); }
	bool operator ==(long Value) const { return operator ==(CBigInt(Value)); }
	bool operator ==(unsigned long Value) const { return operator ==(CBigInt(Value)); }
	bool operator ==(const __int64 &Value) const { return operator ==(CBigInt(Value)); }
	bool operator ==(const unsigned __int64 &Value) const { return operator ==(CBigInt(Value)); }
	
	friend bool operator ==(int A, const CBigInt &B) { return CBigInt(A).operator ==(B); }
	friend bool operator ==(unsigned int A, const CBigInt &B) { return CBigInt(A).operator ==(B); }
	friend bool operator ==(long A, const CBigInt &B) { return CBigInt(A).operator ==(B); }
	friend bool operator ==(unsigned long A, const CBigInt &B) { return CBigInt(A).operator ==(B); }
	friend bool operator ==(const __int64 &A, const CBigInt &B) { return CBigInt(A).operator ==(B); }
	friend bool operator ==(const unsigned __int64 A, const CBigInt &B) { return CBigInt(A).operator ==(B);  }

	bool operator <(const CBigInt& Value) const;
	bool operator <(int Value) const { return operator <(CBigInt(Value)); }
	bool operator <(unsigned int Value) const { return operator <(CBigInt(Value)); }
	bool operator <(long Value) const { return operator <(CBigInt(Value)); }
	bool operator <(unsigned long Value) const { return operator <(CBigInt(Value)); }
	bool operator <(const __int64 &Value) const { return operator <(CBigInt(Value)); }
	bool operator <(const unsigned __int64 &Value) const { return operator <(CBigInt(Value)); }
	
	friend bool operator <(int A, const CBigInt &B) { return CBigInt(A).operator <(B); }
	friend bool operator <(unsigned int A, const CBigInt &B) { return CBigInt(A).operator <(B); }
	friend bool operator <(long A, const CBigInt &B) { return CBigInt(A).operator <(B); }
	friend bool operator <(unsigned long A, const CBigInt &B) { return CBigInt(A).operator <(B); }
	friend bool operator <(const __int64 &A, const CBigInt &B) { return CBigInt(A).operator <(B); }
	friend bool operator <(const unsigned __int64 A, const CBigInt &B) { return CBigInt(A).operator <(B);  }

	bool operator <=(const CBigInt& Value) const;
	bool operator <=(int Value) const { return operator <=(CBigInt(Value)); }
	bool operator <=(unsigned int Value) const { return operator <=(CBigInt(Value)); }
	bool operator <=(long Value) const { return operator <=(CBigInt(Value)); }
	bool operator <=(unsigned long Value) const { return operator <=(CBigInt(Value)); }
	bool operator <=(const __int64 &Value) const { return operator <=(CBigInt(Value)); }
	bool operator <=(const unsigned __int64 &Value) const { return operator <=(CBigInt(Value)); }
	
	friend bool operator <=(int A, const CBigInt &B) { return CBigInt(A).operator <=(B); }
	friend bool operator <=(unsigned int A, const CBigInt &B) { return CBigInt(A).operator <=(B); }
	friend bool operator <=(long A, const CBigInt &B) { return CBigInt(A).operator <=(B); }
	friend bool operator <=(unsigned long A, const CBigInt &B) { return CBigInt(A).operator <=(B); }
	friend bool operator <=(const __int64 &A, const CBigInt &B) { return CBigInt(A).operator <=(B); }
	friend bool operator <=(const unsigned __int64 A, const CBigInt &B) { return CBigInt(A).operator <=(B);  }

	bool operator >(const CBigInt& Value) const;
	bool operator >(int Value) const { return operator >(CBigInt(Value)); }
	bool operator >(unsigned int Value) const { return operator >(CBigInt(Value)); }
	bool operator >(long Value) const { return operator >(CBigInt(Value)); }
	bool operator >(unsigned long Value) const { return operator >(CBigInt(Value)); }
	bool operator >(const __int64 &Value) const { return operator >(CBigInt(Value)); }
	bool operator >(const unsigned __int64 &Value) const { return operator >(CBigInt(Value)); }
	
	friend bool operator >(int A, const CBigInt &B) { return CBigInt(A).operator >(B); }
	friend bool operator >(unsigned int A, const CBigInt &B) { return CBigInt(A).operator >(B); }
	friend bool operator >(long A, const CBigInt &B) { return CBigInt(A).operator >(B); }
	friend bool operator >(unsigned long A, const CBigInt &B) { return CBigInt(A).operator >(B); }
	friend bool operator >(const __int64 &A, const CBigInt &B) { return CBigInt(A).operator >(B); }
	friend bool operator >(const unsigned __int64 A, const CBigInt &B) { return CBigInt(A).operator >(B);  }

	bool operator >=(const CBigInt& Value) const;
	bool operator >=(int Value) const { return operator >=(CBigInt(Value)); }
	bool operator >=(unsigned int Value) const { return operator >=(CBigInt(Value)); }
	bool operator >=(long Value) const { return operator >=(CBigInt(Value)); }
	bool operator >=(unsigned long Value) const { return operator >=(CBigInt(Value)); }
	bool operator >=(const __int64 &Value) const { return operator >=(CBigInt(Value)); }
	bool operator >=(const unsigned __int64 &Value) const { return operator >=(CBigInt(Value)); }
	
	friend bool operator >=(int A, const CBigInt &B) { return CBigInt(A).operator >=(B); }
	friend bool operator >=(unsigned int A, const CBigInt &B) { return CBigInt(A).operator >=(B); }
	friend bool operator >=(long A, const CBigInt &B) { return CBigInt(A).operator >=(B); }
	friend bool operator >=(unsigned long A, const CBigInt &B) { return CBigInt(A).operator >=(B); }
	friend bool operator >=(const __int64 &A, const CBigInt &B) { return CBigInt(A).operator >=(B); }
	friend bool operator >=(const unsigned __int64 A, const CBigInt &B) { return CBigInt(A).operator >=(B);  }

	bool operator &&(const CBigInt& Value) const;
	bool operator &&(int Value) const { return operator &&(CBigInt(Value)); }
	bool operator &&(unsigned int Value) const { return operator &&(CBigInt(Value)); }
	bool operator &&(long Value) const { return operator &&(CBigInt(Value)); }
	bool operator &&(unsigned long Value) const { return operator &&(CBigInt(Value)); }
	bool operator &&(const __int64 &Value) const { return operator &&(CBigInt(Value)); }
	bool operator &&(const unsigned __int64 &Value) const { return operator &&(CBigInt(Value)); }
	
	friend bool operator &&(bool A, const CBigInt &B) { return A && (bool)B; }
	friend bool operator &&(int A, const CBigInt &B) { return CBigInt(A).operator &&(B); }
	friend bool operator &&(unsigned int A, const CBigInt &B) { return CBigInt(A).operator &&(B); }
	friend bool operator &&(long A, const CBigInt &B) { return CBigInt(A).operator &&(B); }
	friend bool operator &&(unsigned long A, const CBigInt &B) { return CBigInt(A).operator &&(B); }
	friend bool operator &&(const __int64 &A, const CBigInt &B) { return CBigInt(A).operator &&(B); }
	friend bool operator &&(const unsigned __int64 A, const CBigInt &B) { return CBigInt(A).operator &&(B);  }

	bool operator ||(const CBigInt& Value) const;
	bool operator ||(int Value) const { return operator ||(CBigInt(Value)); }
	bool operator ||(unsigned int Value) const { return operator ||(CBigInt(Value)); }
	bool operator ||(long Value) const { return operator ||(CBigInt(Value)); }
	bool operator ||(unsigned long Value) const { return operator ||(CBigInt(Value)); }
	bool operator ||(const __int64 &Value) const { return operator ||(CBigInt(Value)); }
	bool operator ||(const unsigned __int64 &Value) const { return operator ||(CBigInt(Value)); }

	friend bool operator ||(bool A, const CBigInt &B) { return A || (bool)B; }
	friend bool operator ||(int A, const CBigInt &B) { return CBigInt(A).operator ||(B); }
	friend bool operator ||(unsigned int A, const CBigInt &B) { return CBigInt(A).operator ||(B); }
	friend bool operator ||(long A, const CBigInt &B) { return CBigInt(A).operator ||(B); }
	friend bool operator ||(unsigned long A, const CBigInt &B) { return CBigInt(A).operator ||(B); }
	friend bool operator ||(const __int64 &A, const CBigInt &B) { return CBigInt(A).operator ||(B); }
	friend bool operator ||(const unsigned __int64 A, const CBigInt &B) { return CBigInt(A).operator ||(B);  }

// Assignment Operators

	CBigInt& operator =(const CBigInt& Value);
	CBigInt& operator +=(const CBigInt& Value) { return *this = operator +(Value); }
	CBigInt& operator +=(unsigned __int64 Value) { return *this = operator +(Value); }
	CBigInt& operator +=(unsigned long Value) { return *this = operator +(Value); }
	CBigInt& operator +=(unsigned int Value) { return *this = operator +(Value); }
	CBigInt& operator +=(__int64 Value) { return *this = operator +(Value); }
	CBigInt& operator +=(long Value) { return *this = operator +(Value); }
	CBigInt& operator +=(int Value) { return *this = operator +(Value); }
	CBigInt& operator -=(const CBigInt& Value) { return *this = operator -(Value); }
	CBigInt& operator -=(unsigned __int64 Value) { return *this = operator -(Value); }
	CBigInt& operator -=(__int64 Value) { return *this = operator -(Value); }
	CBigInt& operator -=(unsigned long Value) { return *this = operator -(Value); }
	CBigInt& operator -=(unsigned int Value) { return *this = operator -(Value); }
	CBigInt& operator -=(long Value) { return *this = operator -(Value); }
	CBigInt& operator -=(int Value) { return *this = operator -(Value); }
	CBigInt& operator *=(const CBigInt& Value) { return *this = operator *(Value); }
	CBigInt& operator *=(unsigned __int64 Value) { return *this = operator *(Value); }
	CBigInt& operator *=(__int64 Value) { return *this = operator *(Value); }
	CBigInt& operator *=(unsigned long Value) { return *this = operator *(Value); }
	CBigInt& operator *=(unsigned int Value) { return *this = operator *(Value); }
	CBigInt& operator *=(long Value) { return *this = operator *(Value); }
	CBigInt& operator *=(int Value) { return *this = operator *(Value); }
	CBigInt& operator /=(const CBigInt& Value) { Div(Value, this, NULL); return *this; }
	CBigInt& operator /=(unsigned __int64 Value) { return *this = operator /(Value); }
	CBigInt& operator /=(__int64 Value) { return *this = operator /(Value); }
	CBigInt& operator /=(unsigned long Value) { Div(Value, this, NULL); return *this; }
	CBigInt& operator /=(unsigned int Value) { Div((unsigned long) Value, this, NULL); return *this; }
	CBigInt& operator /=(long Value) { Div(Value, this, NULL); return *this; }
	CBigInt& operator /=(int Value) { Div((long)Value, this, NULL); return *this; }
	CBigInt& operator %=(const CBigInt& Value) { Div(Value, NULL, this); return *this; }
	CBigInt& operator %=(unsigned __int64 Value)  { return *this = operator /(Value); }
	CBigInt& operator %=(__int64 Value)  { return *this = operator /(Value); }
	CBigInt& operator %=(unsigned long Value) { Div(Value, NULL, this); return *this; }
	CBigInt& operator %=(unsigned int Value) { Div((unsigned long)Value, NULL, this); return *this; }
	CBigInt& operator %=(long Value) { Div(Value, NULL, this); return *this; }
	CBigInt& operator %=(int Value) { Div((long)Value, NULL, this); return *this; }
	CBigInt& operator &=(const CBigInt& Value) { return *this = operator &(Value); }
	CBigInt& operator &=(unsigned long Value) { return *this = operator &(Value); }
	CBigInt& operator &=(unsigned __int64 Value) { return *this = operator &(Value); }
	CBigInt& operator &=(__int64 Value) { return *this = operator &(Value); }
	CBigInt& operator &=(unsigned int Value) { return *this = operator &(Value); }
	CBigInt& operator &=(long Value) { return *this = operator &(Value); }
	CBigInt& operator &=(int Value) { return *this = operator &(Value); }
	CBigInt& operator |=(const CBigInt& Value) { return *this = operator |(Value); }
	CBigInt& operator |=(unsigned __int64 Value) { return *this = operator |(Value); }
	CBigInt& operator |=(__int64 Value) { return *this = operator |(Value); }
	CBigInt& operator |=(unsigned long Value) { return *this = operator |(Value); }
	CBigInt& operator |=(unsigned int Value) { return *this = operator |(Value); }
	CBigInt& operator |=(long Value) { return *this = operator |(Value); }
	CBigInt& operator |=(int Value) { return *this = operator |(Value); }
	CBigInt& operator ^=(const CBigInt& Value) { return *this = operator ^(Value); }
	CBigInt& operator ^=(unsigned __int64 Value) { return *this = operator ^(Value); }
	CBigInt& operator ^=(__int64 Value) { return *this = operator ^(Value); }
	CBigInt& operator ^=(unsigned long Value) { return *this = operator ^(Value); }
	CBigInt& operator ^=(unsigned int Value) { return *this = operator ^(Value); }
	CBigInt& operator ^=(long Value) { return *this = operator ^(Value); }
	CBigInt& operator ^=(int Value) { return *this = operator ^(Value); }
	CBigInt& operator <<=(int nBits);
	CBigInt& operator >>=(int nBits);
	CBigInt& FromString(const char *szBuf, int Radix = 10);

// Output functions and operators
	char* Format(char *szBuf, unsigned long nBuffLen, unsigned long *pNeeded, unsigned int Radix = 10) const;
	char* Format(unsigned int Radix = 10) const;
	void ClearFormatString() { if (m_stringBuf) { delete [] m_stringBuf; m_stringBuf = NULL; } }

	unsigned long ByteSize() const { return (unsigned long)m_ndw * sizeof(unsigned long); }
	int DWordSize() const { return m_ndw; }

	bool IsNull() const { return m_ndw == 0; }
	CBigInt& MakeNull() { if (m_ndw) delete [] m_value; m_ndw = 0; m_value = NULL; return *this; }
};


#endif // !defined(BIGINT_H)

⌨️ 快捷键说明

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