我很疑惑爲什麼我們需要BASE = 100000000和WIDTH = 8。這段代碼來自一本書,但我不明白。C++ Biginteger,這是什麼意思?
struct Biginteger {
static const BASE = 100000000;
static const WIDTH = 8;
vector<int> s;
Biginteger(long long int num = 0) { *this = num; }
Biginteger operator=(long long num) {
s.clear();
do {
s.push_back(num % BASE);
num /= BASE;
} while (mun > 0);
return *this;
}
你還沒有演示使用'WIDTH',這使得無法推斷它的目的。一本參考書,即使只是書的標題也會有所幫助。另外,還不清楚你不理解什麼?具體的價值;他們如何使用;你相信他們根本不需要嗎? –
非常感謝。我明白了你的觀點。 – DeCoder